How do i get the total size of a folder, including everything contained in it?
Printable View
How do i get the total size of a folder, including everything contained in it?
Call the following routine where filespec is the name
of your folder
Sub ShowFolderSize(filespec)
Dim fs, f, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(filespec)
s = UCase(f.Name) & " uses " & f.size & " bytes."
MsgBox s, 0, "Folder Size Info"
End Sub
Regards
Did you even look at what forum your in?
Biggest laugh I've had all day!
Parksie, if that wasn't so sad it would be funny :rolleyes:
Hmmm...but I have been doing my stats 2 project all day, so :(
All I could find was opendir() and readdir(), but VC++ doesn't seem to have headers for them :(
Parksie, im using Turbo C++, and those are in dirent.h, how would i use them? Oh, and just because it might help, i have a function already set up to return the size in bytes of a file.
No idea. I have no documentation and no way of testing. So here's something from microsoft (of all people!):
http://msdn.microsoft.com/library/of...ge/a_modfp.htm