Results 1 to 2 of 2
Hello. From a terminal window, I would like to add an extension to a big group of files. Example... file0.ext file1.ext file2.ext file3.ext I want to add another extension to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-31-2004 #1
- Join Date
- Aug 2004
Adding extensions to files
From a terminal window, I would like to add an extension to a big group of files.
I want to add another extension to these files to get something like
I have a lot of files, so I really do not want to have to cp each individual file.
Is there a shortcut for what I want to do?
Thanks for the help.
- 09-01-2004 #2
You can write a shell script to do this for you. Basically you want a for loop to iterate through the contents of the directory, checking for the extension. Then have it either skip if it's not of the right extension or do a 'mv' if it's the correct extension.
I'm not knowledgeable in BASH, so you'll have to figure out how to implement that or someone else might be able to write it up."Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy