mr1b4w
Last Updated: February 25, 2016
·
225
· stevelacy

Rename all images in folder - to numbers

I had a site which required a for loop of images in a directory. The issue was all the images were the user's profile names.

Rename all images:
```

!/bin/bash

i=0;
for img in *.jpg
do
cp "${img}" "${i}.jpg"
index=$((i+1))
done
```

Filed Under