DeleteXFiles

Description:

baDeleteXFiles deletes files with wildcard matching.

Platforms:

Windows

Usage:

Result = baDeleteXFiles( 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 = baDeleteXFiles( "c:\data" , "*.bak" )

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

Notes:

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

On Macintosh, the FileSpec is 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.
 

See also:

baDeleteFile
baFileExists