Extensions Reference

Extensions Reference > fsFilesystem


fsDelete

int fsDelete(string Filename);

 

Deletes the specified file (or pattern)

The FSDELETE function immediately deletes the specified file or files, if a wildcard pattern is used. Files are fully deleted from disk and do not get sent to the Recycle Bin, therefore be extremely careful when using this function.

 

Parameters

Filename

The path and filename or file pattern to delete. Remember to escape backslashes in any paths.

 

Return Value

The number of files deleted successfully. For completeness you should check the number of files matching the deletion pattern before and after FSDELETE is called, as security settings (filesystem permissions) may prevent all files from being deleted.

 

Example Code

// iDeletions contains the number of deleted files
int iDeletions = fsDelete("C:\\Temp\\*.tmp");