I have hundreds of file andI want to remove last 7 characters from the filename but keeping its extension.
Old name:
abc_xyz12_4567.txt
abcde_xyz12_4567.txt
New name:
abc_xyz.txt
abcde_xyz.txt
|
|
|
try
you can use
to have a preview. |
|||||||||
|
|
You can use rename (Or
|
|||||||||
|
|
with GNU
OUTPUT
That will do it all safely - and in fact you don't even need the
|
|||
|
|