TannerRitchie Web Applications

Advanced Web Application Development in the GTHA

Rename files to consecutive numbers – bash

I’m always trying to remember this.

N=0;for i in *.jpg; do mv "$i" "$N".jpg; N=$[$N+1]; done