I am looking for a python script that will find the the exact filename of an existing file in the current directory that this python script will run from, that may be named incrementally.
For example the file could be:
file1.dat
file2.dat
file3.dat
....
So we know that the file name starts with the prefix file and we know that it ends with the sufix .dat.
But we don't know whether it will be file1.dat or file1000.dat or anything inbetween.
So I need a script that will check in the range of say 1-1000 all filenames from file1.dat to file1000.dat, and if it finds the one that does exist in the directory, it returns a success message.
 
     
     
     
    