Have you tried to view if the files are there via?
I'm assuming that /media/<rest of listing>/archive still exists, correct?
I'm saying this because when you perform the
command, you should see files which have names that normally make them hidden for a normal
command. But if the files and/or directories are still there just with hidden names, you firstly can still traverse into those directories using the exacting names, or merely rename the directories using the
command. You'll be able to see the files and then know how to deal with them. See my comment at the end by the way for an alternative.
Yes, hindsight is the unfortunate dilemma you're stuck in. For the future, if there's something complicated such as this, which could have sweeping effects, even if you seem sure, it may be more prudent to validate the outcome first, i.e.
Code:
find /media/<rest of listing>/archive -name "*:*"
Verify that this gives you the files desired.
Then next execute your rename command on one of those files only and verify that it works as you expect.
And as they say, you learn something new everyday. Kudos to you because I've always renamed batch files via some other more complicated means using sed or gawk. Didn't even know there was such a shell command as rename. I like it. What I've done at times to rename a bunch of files, is complicated. I use
Code:
ls <file-filter> > t.sh
and what that does is places the outcome of my ls command into t.sh. I then edit t.sh as a CSV file using a spreadsheet program, copy that column to make two of them, insert a first column all as mv, and then re-save it as CSV. The result is each line shows up as
Code:
mv,<filename>,<filename>
and then I edit that and search/replace the second filename in each grouping to be my desired outcome. Yes it seems lengthy, but instead of running a killer command, I'm running the same command in a form that I understand clearly and since I'm good at find-replace and a good typist, it doesn't bother me to do it this way. Still, I shall experiment with the rename command now that I know about it. :-)