The function DeleteFiles deletes all files which match der parameter FileMask and returns the number of deleted files. The parameter FileMask may contain the usual wildcards ? and * in the filename and the extension but not in the path.
Please note that DeleteFiles actually deletes the specified files (they are not moved to the recycle bin). Use the function MoveToRecycleBin in order to move the files to recycle bin.