How do you get directory size in vb.net 
Author Message
 How do you get directory size in vb.net

Microsoft's documentation says to use the fileinfo class's
length property for files or folders. Unless I am missing
something, trying to get the size of a folder using
fileinfo class's length property returns an exception of
could not find file. If anyone knows how to get a folder's
size in vb.net please post example here or send me an e-
mail.

Thank You,
Stephen



Sat, 30 Oct 2004 22:46:45 GMT  
 How do you get directory size in vb.net

Quote:
> Microsoft's documentation says to use the fileinfo class's
> length property for files or folders. Unless I am missing
> something, trying to get the size of a folder using
> fileinfo class's length property returns an exception of
> could not find file. If anyone knows how to get a folder's
> size in vb.net please post example here or send me an e-
> mail.

> Thank You,
> Stephen

You have to iterate through all files and subfolders to get the folder size.


Sat, 30 Oct 2004 22:53:23 GMT  
 How do you get directory size in vb.net
Use the Directory Class?

Quote:
> Microsoft's documentation says to use the fileinfo class's
> length property for files or folders. Unless I am missing
> something, trying to get the size of a folder using
> fileinfo class's length property returns an exception of
> could not find file. If anyone knows how to get a folder's
> size in vb.net please post example here or send me an e-
> mail.

> Thank You,
> Stephen



Sat, 30 Oct 2004 23:05:34 GMT  
 How do you get directory size in vb.net
Err, that is DirectoryInfo Class.  Darn spell checker. ;(

Quote:
> Use the Directory Class?


> > Microsoft's documentation says to use the fileinfo class's
> > length property for files or folders. Unless I am missing
> > something, trying to get the size of a folder using
> > fileinfo class's length property returns an exception of
> > could not find file. If anyone knows how to get a folder's
> > size in vb.net please post example here or send me an e-
> > mail.

> > Thank You,
> > Stephen



Sat, 30 Oct 2004 23:07:51 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. getting directory size in vb

2. Getting Directory size in VB???

3. getting directory size

4. Getting the size of files directories, and drives....

5. Getting directory size - how ?

6. Getting size of entire directory

7. Getting a detailed directory listing using Internet transfer control, file sizes

8. Getting the total size of a directory

9. getting the size of a directory

10. API for getting the size of a directory

11. Getting specified directory (with subdirs) size

12. Getting the total size of a directory

 

 
Powered by phpBB® Forum Software