Created
March 8, 2013 16:56
-
-
Save aokj4ck/5117954 to your computer and use it in GitHub Desktop.
Wanted to rename a folder of images to a prefix with a number after each. Hacked this up instead of renaming them manually. Requires modifying to whatever prefix and filetype you want.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
count=1 | |
files="$(ls)" | |
for X in $files | |
do | |
mv $X "prefix${count}.filetype" | |
count=$((count+1)) | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment