I'm hoping to be able to run the convert command on a parent folder that will have multiple sub-folders nested within it. The sub-folder names will change over time, as will the image filenames. The only thing that won't change will be the output folder. I know the convert command can run on a specific folder and convert all images within it, but if I want it to search through the existing folders, convert all of the images and place them into the output folder, what command do I need to use?
I've tried using find without much luck, and mogrify doesn't seem to do what I need either, so I'm not sure whether it's actually possible?
Thanks!
Convert images in multiple sub-folders
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert images in multiple sub-folders
IM doesn't have a "do subdirectories" command, so you would handle that with a script, calling IM once per subdirectory, possibly recursively.
snibgo's IM pages: im.snibgo.com
Re: Convert images in multiple sub-folders
Thanks - unfortunately as the directory names change regularly I don't think I can do that.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert images in multiple sub-folders
A script wouldn't need to know the directory names in advance. It would loop through all the directories, whatever their names. How you do this will depend on your script language. For example, in Windows:
(If run from the console, don't double the "%".)
Code: Select all
for /D %%f in (*) do echo %%f
snibgo's IM pages: im.snibgo.com
Re: Convert images in multiple sub-folders
Ah ok, makes sense - thanks a million