A method I can think of is:
1. store the filename in a temporary file
Echo $FILE > filename.tmp
2. Use findstr with the proper regex to test the search string in the temporary file.
At this link you find a good reference of the findstr command and how to create the regex to test the filename:
http://www.computerhope.com/findstr.htm[
^]
Good luck!