for loop - Bulk rename files ascending in number -


I have a file named 5000.swf and one of the .swf files in another folder The group is random name now I want to change the name of each file in the folder with random names (for example word.swf 5001.swf to otherword.swf to 5002.swf and so on. Is it possible with .sh script?

This is a method using BASH:

  # ! / Bin / sh counter = "$ (Basename /path/to/file/5000.swf" .swf ")" for I /path/to/random/files/*.swf; Switch to ((counter ++)) MV "$ i" "$ counter.swf"; a  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -