If I try to run a regex operation on files like so (example):
$ mv *.ext *.new.ext
That does not work.
How do I ensure that when I batch rename or perform an operation on multiple files that they keep their current name (not the extension, just the name)?
Note: I am not looking for something like the rename
command because this has to work for everything, not just renaming files.
Note 2: Okay, these answers are good and explains things to me that I didn't properly understand before. Thanks!
The command in question I am trying to use is called firmtool
, and is used in the 3DS homebrew scene.
It packs .bin files into .firm files and I would like it to run on all .bin files in a directory, packing them while preserving the original name.
Here is the syntax I need for the firmtool
command:
firmtool build test.firm -n 0x23F00000 -e 0 -D arm9loaderhax.bin -A 0x23F00000 -C NDMA
where test.firm
is the output and arm9loaderhax.bin
is the input.
I want to run this command that if I have a directory with test1.bin
and test2.bin
that it produces test1.firm
and test2.firm
. Please let me know if I can use regular expression or a loop to complete this command. Thank you for any help!