bash - Renaming files in a folder to sequential numbers - Stack Overflow
Discovered: Sep 15, 2023 09:14 bash - Renaming files in a folder to sequential numbers - Stack Overflow <– ls -1prt ¦ grep -v "/$" ¦ cat -n ¦ while read n f; do mv -n "${f}" "$(printf "%04d" $n).${f#*.}";