Say I have these files:
essay.aux essay.out
essay.dvi essay.pdf
essay.fdb_latexmk essay.tex
essay.fls essay.toc
essay.log ......
How do I rename them to:
new_name.aux new_name.out
new_name.dvi new_name.pdf
new_name.fdb_latexmk new_name.tex
new_name.fls new_name.toc
new_name.log ......
The problem is that they have different extensions rather than different names, so I cannot use answers from this question. Also, I'm on macOS which doesn't have a rename command.
touchsome random files and do some experiments ;)perl, so the easiest way to do this is to install the File::Rename CPAN module, then you can use therenamescript which is included as an example. It's the same perl rename script mentioned in many answers to similar questions on this site. It's more work up-front, but then you have the best file-renaming tool available for all future renaming tasks.brewalready installed - and you should - just runbrew install rename. This is not the same as theFile::Renamescript but was inspired by it. It seems to have many more command-line options, but is backwards compatible with therenamereferenced here so frequently.