|
-
Jan 16th, 2000, 11:23 AM
#1
Thread Starter
New Member
How to get Folder's size?
Not disk free space or not file size it is just folder size like a right click of properties.
Thanks
-
Jan 16th, 2000, 12:28 PM
#2
PowerPoster
It's a bit of a slow way of doing it, but you could simply get the size of each file in the directory and add them up...
Use a loop to gather size of each file in the directory (look up the Dir() function in Help and go to http://www.vb-world.net/files/fileinfo/ to find out about getting file size), then simply add each file size to a variable...
Hope that helps
regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it 
-
Jan 16th, 2000, 10:15 PM
#3
Member
Use the Folder object. Set a reference to Microsoft Scriptime Runtime and then instantie a folder object and a file system object.
Dim fso As FileSystemObject
Dim fldr As Folder
Set fso = New FileSystemObject
Set fldr = fso.GetFolder(path to folder)
?fldr.Size
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|