Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

rename files with sequential numbers linux

# rename random file names to incrementing numbers with prefix (new_name)
rename 'our $i; s/^[^.]+/sprintf "new_name-%02d", $i++/e' *.jpg
# output: new_name-00.jpg new_name-01.jpg etc
 
PREVIOUS NEXT
Tagged: #rename #files #sequential #numbers #linux
ADD COMMENT
Topic
Name
7+2 =