pearlofperls
Technical User
Hi
Im stuck in the following issue:
I have a directory where correct file names are:
*_0.txt
*_1.txt
Then through a publisher some incorrect file names are produced:
*_12.txt
*_0123.txt
*_04321.txt
all files that are incorrect above need to be replaced with ending in *_1.txt
therefore need to create a loop to find the wrong files in a dir ->that dont end in _1.txt or _0.txt and then modify the end of the files names to *_1.txt while retaning the orginal part of the filenames.
Im stuck in the following issue:
I have a directory where correct file names are:
*_0.txt
*_1.txt
Then through a publisher some incorrect file names are produced:
*_12.txt
*_0123.txt
*_04321.txt
all files that are incorrect above need to be replaced with ending in *_1.txt
therefore need to create a loop to find the wrong files in a dir ->that dont end in _1.txt or _0.txt and then modify the end of the files names to *_1.txt while retaning the orginal part of the filenames.