commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This command is useful for renaming a clipart, pic gallery or your photo collection. It will only change the big caps to small ones (on the extension).
The simplest way I know.
Use 'mmv' for mass renames. The globbing syntax is intuitive.
Replace 'SHOWNAME' with the name of the TV show.
Add -n to test the command without renaming files.
Check the 'sample output'.
Best to try first with -n flag, to preview
Useful if non-ascii characters in filenames have been improperly encoded. Replace "PROBLEM" with the incorrect characters (e.g. 'é'), and "FIX" with the correct ones (e.g. '?').
A powerfull way to rename file using sed groups.
& stand for the matched expression.
\1 referes to the first group between parenthesis. \2 to the second.