473,372 Members | 1,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Folder size

Hi guys,

How do I get the size of a folder. Is there a function
in .net or do I have to invoke a component/dll.Couldnt
find anything in DirectoryInfo or Directory classes.

Thanks in advance
Nov 16 '05 #1
2 5511
You would have to walk through the files and get the sizes of each. A
folder inherently doesn't have a size. What you mean is actually the size
of all the files inside the folder.

-vJ

"BlueKnight" <an*******@discussions.microsoft.com> wrote in message
news:aa****************************@phx.gbl...
Hi guys,

How do I get the size of a folder. Is there a function
in .net or do I have to invoke a component/dll.Couldnt
find anything in DirectoryInfo or Directory classes.

Thanks in advance

Nov 16 '05 #2
Hi

Please check the following

http://www.codeproject.com/useritems/showdirsize.asp

HTH
Ravikanth[MVP]

"BlueKnight" wrote:
Hi guys,

How do I get the size of a folder. Is there a function
in .net or do I have to invoke a component/dll.Couldnt
find anything in DirectoryInfo or Directory classes.

Thanks in advance

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Chris | last post by:
Hi, Not sure if this is the right forum, but hopefully someone can help me. I am creating something for our intranet and i want to list the files and folders of a directory, i found some code...
8
by: Ty Moffett | last post by:
What is the best way to find the size of a folder (actually it's contents) on a disk?
2
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified...
12
by: grouped2000 | last post by:
g'day group, I need some code that will give me the total size of a folder. In the MSDN I've found some code, but I cannot figure out how to use this code at all ... I am quite new to .NET, I...
6
by: Caleb Hattingh | last post by:
Hi everyone Unless you have a nice tool handy, calculating many folder sizes for clearing disk space can be a click-fest nightmare. Looking around, I found Baobab (gui tool); the "du"...
3
by: TyBreaker | last post by:
I have a vbscript which returns the folder size of any folder instantly by referring to Folder.Size. I don't need any iteration or recursion through the subfolders, adding together individual file...
9
by: Eugene Anthony | last post by:
How do I calculate the size of a folder? Also how do I count the number of images stored in a folder? Eugene Anthony *** Sent via Developersdex http://www.developersdex.com ***
4
by: shuisheng | last post by:
Dear All, I'd like to build a structure similar to the folder tree which 1. Has a root. 2. Nodes can be folder or files. 3. Folder can contain folders and files. 4. Name of folders and files...
5
by: bharathreddy | last post by:
How to find the size of a folder using C# code? step1: Here take the folder which u want to find the size, then pass that folder to the recursive function name FolderSize!. DirectoryInfo...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.