I have two groups of files that all contain a timestamp in their names. The timestamps are identical between file groups. I want to match the files from Group 1 with their counterpart in Group 2, but there are more files in Group 1 than in Group 2. How do I only open files from Group 1 that match a timestamp in Group 2? The timestamp is only part of the filename.
Ex. CAL_LID_2011-11-01T00-47-43ZN.nc
The '2011-11-01T00-47-43' is the timestamp that needs to be matched to a file in Group 2. I've tried to write an if statement to open the files, but I'm stuck. Any help is appreciated! Thanks!
Best Answer