I am trying to iterate over image folders to create thumbnails using ImageMagic and rename thumbnail files with small_ prefix.
when I execute this in one folder, it works fine:
FOR %a in (*.jpg) DO convert %a -thumbnail 30% small_%a
To iterate over subfolders, I just need the / R flag:
FOR /R %a in (*.jpg) DO convert %a -thumbnail 30% small_%a
This will result in a new name for the thumbnail small_c:\images\image.jpg , which is incorrect :)
How can I get the small_ prefix in the file name when recursing through subfolders in the script, i.e. from c:\images\image.jpg to c:\images\small_image.jpg ?
Thanks.
command-line image recursion rename windows-scripting
Andrija cacanovic
source share