Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux rename command incremental

# 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: #linux #rename #command #incremental
ADD COMMENT
Topic
Name
2+6 =