Skip to content

Instantly share code, notes, and snippets.

@situee
Last active December 23, 2015 17:09
Show Gist options
  • Select an option

  • Save situee/6666623 to your computer and use it in GitHub Desktop.

Select an option

Save situee/6666623 to your computer and use it in GitHub Desktop.
Batch rename image to sequence number
n=0
for file in *.jpg; do
file_name="$n.jpg"
n=$(( $n+1 ))
mv $file $file_name
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment