Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COUNTER=0
- mkdir renamed-files
- for OLDNAME in *.jpg; do
- while true; do
- COUNTER=$(($COUNTER+1))
- NEWNAME=renamed-files/`printf '%08d.jpg' $COUNTER`
- if [ ! -e $NEWNAME ]; then break; fi
- done
- mv "$OLDNAME" "$NEWNAME"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement