Created
November 4, 2024 05:49
-
-
Save mmguero/7227022fb1d5d4827c18494921c0d41b to your computer and use it in GitHub Desktop.
rename files sequentially with leading zeroes, keeping extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num=0; for i in *; do mv "$i" "$(printf '%04d' $num).${i#*.}"; ((num++)); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment