You've got a couple of problems. First, you define pattern and pattern1, but you never use pattern1. And, second, these are filename matching patterns, not regular expressions. So the filename matching pattern File_[0-9]*.csv will match any string that starts with "File_" followed by a single digit followed by any number of any character, followed by ".csv" at the end of the string.
If you want to match a filename like File_23_23.csv you could use File_[0-9][0-9]_[0-9][0-9].csv .
File_23_23.csv
or
File_112_156.csv
or
File_11111_55577.csv
or it can be any number.
and other thing
File_12_45.csv is being matched by File_[0-9].csv i.e underscore is also being taken in [0-9] although it is not a numeral.
is there any way i can distinguish between these types of file like File_%N%.csv and File_%N%_%N%.csv