+ t t e Rename tagged files set %t; CMD=%{Enter regex} while [ -n "$1" ]; do echo rename -\"s"$CMD"e\" "$1" rename -\"s"$CMD"e\" "$1" shift done
first you will need to flag the files toy want to rename then execute the user operation. When you do so you will be prompted for the regular expression you with to execute.
Some examples:
/oldword/newword/ # Change a word. /_/ /g # Replace all _'s with spaces. /_\[.*\]// # Remove _[CRCHASH] tags. /\(.*\)// # Remove (...) sections.
1 comment:
ok. This is a relevant post. I think anyone who uses mc may arrive at this point some day. But I don't understand about shell regex. Couldn't understand how should I activate the script, I mean, which is the keyboard shortcut to activate it? Furthermore, what if I want to erase some part of all files, for example:
2020Fev17_0.xml -> 0.xml ?
Anyway, thanks for the script. I'm gonna bookmark it, I'm sure I'm going to use it someday
Post a Comment