Renaming files appened sequential numbers

Many time we feel a requirement of renaming our multiple file with single name and having versioning or appended number after the real name.

There is hardly any light weight application available for the purpose.


after search i found the solution which i like to share with all of you peoples.

I am using shell script or say bash file for that solution


  1. Create  a file having extention .sh say
  2. Add text to the file where appended_string is the text you want to append example (its_my_file)
  3. Change the extention “.jpeg” with your type of files.
     for j in *.jpeg; do
     new=$(printf "appended_string%03d.jpeg" "$x") #03 pad to length of 3
     mv -- "$j" "$new"
     let x=x+1

    mv -i -- "$j" $new"

    if you do not want to automatically overwrite existing files.

  4. Place the File in directory or folder in which your file with given extention(.jpeg) is placed.
  5. Open Command Line tool Like Terminal
  6. Run file typing command



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s