Open novoid opened 3 years ago
In my case I would like to have this feature. Sometimes I do not want to append text, I only want to replace the entire filename (maintaining the date or date-time). Is this possible right now, or is there any other way? I have found this tool https://github.com/ayoisaiah/f2 but right now I do not have much time to read the documentation. If you know about something to replace multiple files' filenames while maintaining date-times let me know.
I only want to replace the entire filename (maintaining the date or date-time). Is this possible right now, or is there any other way? I have found this tool https://github.com/ayoisaiah/f2 but right now I do not have much time to read the documentation. If you know about something to replace multiple files' filenames while maintaining date-times let me know.
For use-cases like that, I'm using vidir or the according dired version within Emacs. However, when you don't use vim nor Emacs, there are multiple ways of modifying multiple file names in one go. There's mmv as a CLI tool and UI file browsers like FreeCommander/TotalCommander do offer features in that direction as well.
Hi, thanks for the response. Finally I found a fast way of doing it. My filenames after taking photos with the camera are something like: ASC0001, ASC0010 ... The solution to renaming all of them with the same name is:
date2name -w ASC*
to insert date and time to all those files.f2 -f 'ASC0*(?:[1-9][0-9][0-9]?|[1-9]|1000)*' -r 'replacetext' -x
to replace the text ASC00...
There are certain situations where I need to remove one or more words from selected file names.
One example is after added a set of words that contain a typo.
An implementation of this would also addresses #8
Constraints
This issue is a central spot to collect ideas on how to come up with a consistent concept to remove words. This has to work on one file as well as on a group of selected files. It has to work on file names that end with the same set of words as well as with sets of files that do have completely different file names.
Furthermore, there should be ways to deal with edge cases. A few examples:
Brainstorming
-2
which results in removing the last two words (separated by spaces or underscores) from the file name.filetags
, the user might be able to interactively enter-"foo bar"
or-foo
to remove the words "foo bar" or "foo" from the end of the existing file names of selected files. If not found, nothing gets removed. Filetags are ignored and are not considered being part of the file name here.Contribute!
Please add your ideas here as well!