I have dozen thousand files with names like the following:
SHARK_225054651_41_0547_r001SHARK_225054651_41_0548_r005SHARK_225054651_41_0548_r009...SHARK_225054651_41_0619_r121SHARK_225054651_41_0620_r125...SHARK_225062101_41_0621_r001SHARK_225062101_41_0621_r005SHARK_225062101_41_0622_r009...SHARK_225062101_41_0653_r121SHARK_225062101_41_0654_r125
each file's name end up with …..r%%%, the three %%% digits are 001, 005,….up to 121, 125. Total thirty-two with increment equals four and the same SHARK_%%%%%%%%%_%%_%%%%_r%% name before _r%%%. Then another file starts over with the same r%%% iteration.
However, the actual file has a "jump" for instance r005 is missing between r001 and r009.
Is there a way to read out the file name with some logic loop to pick up the missing one?
Best Answer