4 ms·
No need for a filemanager for in place file renaming. For that I'd just use curly bracket in bash or zsh. e.g. mv /path/to/file{-old-name,-new-name}.txt w
by Lio 8y ago
No need for a filemanager for in place file renaming. For that I'd just use curly bracket in bash or zsh.
e.g.
mv /path/to/file{-old-name,-new-name}.txt
which expands to:
mv /path/to/file-old-name.txt /path/to/file-new-name.txt
So use tab completion to get your path then go back and stick your curly brackets into it as needed. Oh and it works for things like git branch renaming or anything else you do in the terminal.
- JNRowe 8y agoIf you're a zsh user you can also use the other zshparam(1) stuff too. Like "mv file.ext{,(:r)}" to perform "mv file.ext file", or :l to lowercase a filename, or any number of other sometimes useful or often pointless things ;) I've used :l a number of times, but :s for substition is probably the most useful in general.
- em-bee 8y agothanks, but that takes more conscious effort to get right that is worth it for me. i tend to just copy the filename twice and then edit the second version to the target. but now i'll become good friends with qmv greetings, eMBee.