|
-
Dec 3rd, 2000, 02:24 PM
#1
How do i get the total size of a folder, including everything contained in it?
-
Dec 3rd, 2000, 02:45 PM
#2
Lively Member
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
-
Dec 3rd, 2000, 03:39 PM
#3
Did you even look at what forum your in?
-
Dec 3rd, 2000, 04:27 PM
#4
Monday Morning Lunatic
Hehehehehehehe.
Biggest laugh I've had all day!
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 3rd, 2000, 04:58 PM
#5
Frenzied Member
Parksie, if that wasn't so sad it would be funny
Harry.
"From one thing, know ten thousand things."
-
Dec 3rd, 2000, 05:03 PM
#6
Monday Morning Lunatic
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
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 3rd, 2000, 05:21 PM
#7
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.
-
Dec 3rd, 2000, 05:23 PM
#8
Monday Morning Lunatic
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
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|