I'm having a problem with _FileExists. It seems like this function does not handle wildcards.
My goal here is to see if there are any files in the same folder where the program is located named Trash1,txt, Trash2.txt, Trash3.txt, etc.
Take this as an example:
If _FileExists("Trash*.txt") Then
Kill "Trash*.txt"
End If
The above program would fail to delete those files because _FileExists appears to be unable to handle wildcards.
If I would run the kill command by itself, it would successfully delete those files. However if there are no files named Trash*.txt, then the kill command would cause a failure in the program so I have no choice but to determine if any files named Trash*.txt exist first and that is what the "if" statement is supposed to do.
Since _FileExists won't work for this, can anyone suggest a workaround for me?