One of my tasks is to count the number of files that match a certain date pattern. Really what I need to do is loop through the directory, examine each file name, find the 2nd period in that file name, and then examine the next 4 characters to see if there is a match on the date string I am assembling.
November of 2012 would be represented as "1211". Using the first four characters after the 2nd period in the file names below, this would give us a hit on the first file name ("o.tt.121113150804") since it matches that pattern. I would count that file and then leave the other two alone.
The files below are just a sampling. They can be named in many different ways. They usually are just variations of the below 99% of the time. The fact that there are 2 periods and I need to check the 4 digits after the 2nd one is a definite constant though.
File names I need to check:
o.tt.121113150804
o.stpw.101209092541
i.rtat.120831045704