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:
replace the "-" by the character you wish. If you have multiple extentions, like jpef, jpg and JPG you could use
mmv "*-*.*" "#1.#3"
There are 3 alternatives - vote for the best!
Renames files eliminating suffix, in this case everything after "-" is cutted. Just change "-" with the character you need.
of course, replace the "-" after / by the character you wish. a dot must by protected by a backslash, as it is a regexp. it's the same result as the command proposed. but if there is more than a dash in the name, only the part before the first dash is kept... so that's not an "extension renaming" command.
If you can do better, submit your command here.
You must be signed in to comment.