Last active
May 20, 2021 14:39
-
-
Save cognominal/042d86211a0fb898b7401779c78f025e to your computer and use it in GitHub Desktop.
rename files in the current folder starting with numbers by prepending 0 to get 3 digits numbers
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
#! /usr/bin/env raku | |
my @files = dir; | |
for @files { | |
rename $_, sprintf("%03s", $0 ) ~ $1 if /(\d+)(.*)/; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment