![]() This is among the easiest to use GUI tools for bulk renaming files under Linux and it also offers enough options. Thunar, the default Xfce file manager, comes with a built-in tool that allows bulk file renaming. It can optionally alter the contents of files too (hence the need for -rename in all the above examples).ĭisclaimer: I am not affiliated with repren or it's development in any way, I just find it an invaluable time-saving tool. Below you'll find 3 Linux GUI utilities that should be able to cover most of your bulk renaming needs. I know I can do this action by writing my own php-cli script, but I would like to know of an easier and faster solution. My files have names like 'T452-102456-0.png' and I want to delete the '-0' part. I don't have the perl package for the rename command. This is just scratching the surface of what repren is capable of though. I want to rename a lot of files on Mac OS X (10.7.2). To do this on the command-line, you'd need to use single quotes I think (correct me if I'm wrong): repren -rename -from 'figure ()' -to 'Figure \1' -dry-run path/to/directory_or_files_here The \1 syntax inserts the contents of the first (bracketed) group. My idea was something like putting original names in column 1 of a table and put the new names in column 2 next to them. Hence, all original file names should be replaced by the new names within the files, too. Consider this pattern file: # This is a comment Within the files various of the file names can show up. Repren also supports pattern files, allowing you to do multiple replacements in 1 go: repren -rename -patterns=path/to/patternfileĪ pattern file looks like this: regex_1replacement_1įinally, it supports regular expression groups. It does a dry run though to show you what it will do without actually doing it - remove the -dry-run bit once you're sure that it will do what you intend. The above example deletes the first 3 digits in all filenames if they are at the beginning thereof for all files recursively in the current directory. ![]() ![]() You can do just a single regular expression pattern like so: repren -rename -from "^" -to "" -dry-run. While it isn't installed by default, it does support regular expression-based file renaming. ![]() Since I don't see it mentioned here yet, you can use repren. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |