FolderSize

Description:

baFolderSize returns the size of a folder.

Platforms:

Windows and Macintosh

Usage:

Result = baFolderSize( Folder, FileSpec, SubFolders )

Arguments:

String, string, integer.
Folder is the folder to get the size of.
FileSpec determines what files are included.
If SubFolders is true, the size of subfolders is also included.

Returns:

Integer.
Returns the size of the folder in kilobytes (1k = 1000 bytes).

Examples:

Director:
size = baFolderSize( "c:\Data", "*.*", 1 )

Authorware:
folder := baFolderSize( "c:\\Data", "*.*", 1 )
 

Notes:

On Windows, the FileSpec is a DOS wildcard, eg "*.bmp". Only one type can be specified. Use "*.*" to match all files.

On Macintosh, the FileSpec can be either a four character type code eg "TEXT" or an extension eg ".txt". Only one type or extension can be specified. Use an empty string or "*.*" to match all files.