Search Tools Links Login

Advanced Directory Size Checker


Visual Basic 6, or VB Classic

I needed to know the size of a directory and its subdirectories (including files). Then I wanted to be able to also exclude some of the file(s) in that directory from the total directory size. So, I wrote this dll in C. You can however use it in VB as well for ease of use. Very Handy !

Original Author: Marc Shepley

Inputs

MBDIR(1,2,3)
' parm 1 = path to start listing from
' MUST END WITH A BACKSLASH
' parm 2 = output filename (fully qualified)
' parm 3 = filename containing the files (and directories) to exclude (OPTIONAL)
'
' returns -1 for error else
' total size for that directory
'
' assume no filename (including paths) are > 1024 bytes long
' assume directories end in a
' assume the exclude list is < 20 (files & dirs)

Returns

usedspace = MBDIR("c: emp", "c:output.dat", "c:exclude.dat")

Side Effects

The output.dat is for viewing purposes only and you can delete it afterswards if you dont need it.
The exclude.dat contains the excluding file(s) with their fully qualified path in "".
This is optional, if you dont want it use ""

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 90 times

Categories

Visual Basic 6

Attachments

CODE_UPLOAD48004142000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 1,150 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.