i want to retain only one tar file per store in my current directory and move the remaining tar files to Temp directory
so in this case for stores "moc", "can" we have more than one tar file
so for stores "moc", "can" the tar file which got created first should be retained in current dicrectory and remaining
files should be moved to temp directory
Last edited by Scrutinizer; 04-23-2018 at 11:43 AM..
Reason: code tags
Please be aware that NO two or more files with the same, identical name can exist an a directory. So the sample data given are not representative. Still, if the names' structure persists, rdrtx1's proposal will work as desired.