shell script to rename multiple files - Linux Views : 676
Tagged in : Linux
0 0
Send mail
shell script to rename multiple files:

Renaming multiple files in a folder is easy using linux shell script.

Save this file in a ".sh" extension to tell the system that this a shell script. Place this file inside the folder where you want to rename multiples files.

For example, here we have used the script to rename all .gif files to .jpg files.
#!/bin/bash
for x in *.gif;
do n=${x/.gif/.jpg};
echo $n;
mv $x $n;
done


Modify the script to your requirement.
Razz

By Ramya, On - 2009-11-07



    Login to add Comments .