XDelete

Description:

baXDelete deletes files with wildcard matching, including sub-directories.

Platforms:

Windows and Macintosh

Usage:

Result = baXDelete( DirName , FileSpec )

Arguments:

String, string.
DirName is the folder to delete the files from.
FileSpec determines what files are deleted.

Returns:

Integer.
Returns 1 if all the matching files were successfully deleted or if DirName doesn't exist, else 0.

Examples:

Director:
OK = baXDelete( "c:\data" , "*.bak" )

Authorware:
OK := baXDelete( "c:\\data , "*.bak" )
 

Notes:

Any empty directories that are left will also be deleted.

on Windows, the FileSpec argument follows normal DOS wildcard rules. A * means match any character in the file name. So *.* deletes all files in the directory; *.bmp deletes all files with a .bmp extension; T*.* deletes all files starting with the letter T.

On Macintosh, the FileSpec argument can be either a file type, eg. "JPEG" or an extension .jpg.
 

See also:

baDeleteFile
baDeleteXFiles
baFileExists