Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

number all files in a folder

a=1
for i in *.jpg; do
  new=$(printf "%04d.jpg" "$a") #04 pad to length of 4
  mv -i -- "$i" "$new"
  let a=a+1
done
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #number #files #folder
ADD COMMENT
Topic
Name
2+6 =