I have 100 files that are named 1.jpg,2.jpg,3.jpg….100.jpg in a folder. I would like to rename them sequentially starting from number 83. Eg: 1.jpg becomes 83.jpg, 2.jpg becomes 84.jpg and so on..
I am looking for a OSX command or batch script in Windows.
Thanks.
I have tried this where i=83, but it always starts renaming 1,jpg as 100.jpg, 2.jpg as 101.jpg..so on.
i=1
for f in *; do
[[ -f $f ]] && mv “$f” $((i++)).txt
done
Came across this script in stack forum but not sure how to set the start number to be 83 instead of default 1
ls | cat -n | while read n f; do mv “$f” “$n.txt”; done