Dynamically generated folders based on filenames

  • Crop and convert:

    I think ImageMagick can convert raw to jpg, so it probably makes sense to do the crop and conversion at the same time using that, rather than convert to jpg and then crop (which is both slower and lower quality, at least assuming ImageMagick can do a quick thumbnail/preview extraction on the raw files like Opus can).

    I haven't had a chance to look up the appropriate ImageMagick command line to do that, but it's usually fairly simple once you find the right part of the documentation (the hardest part, since ImageMagick can do so much and has so many command line options).

  • Finding the files to work on:

    There are two ways you could do this.

    The simplest would be to run the Find command to generate a list of CR2 files below the starting folder(s), then run a second command on the results. (The Find command will let you automate most of what you can do via the Tools > Find Files UI, saving you having to click and type into the UI every time you want to do a particular search.)

    The more complex way would be to have a script which searches for the files itself, and then runs ImageMagick etc. on them automatically, without needing a second step. The script could be similar to the 'Fetch' command: Find and copy related files script which can search for related files and demonstrates how scripts can enumerate folders. (There's also a more simple example in the default script you get when creating a new script button.)

  • Moving the files:

    That part will just involve running a copy/move command on the files after the ImageMagick command. The other bits are the harder parts.