Output path in batch processor

Started by 6b6561, April 26, 2024, 08:46:28 AM

Previous topic - Next topic

6b6561

Hi,

I ran into a problem with setting up the output path in the batch processor.

I'm trying to process something like:
X:\Images\1\1.jpg
X:\Images\1\2\2.jpg
X:\Images\1\2\3\3.jpg

And I would like to get an output structure like:
Y:\Out\1\1.jpg
Y:\Out\1\2\2.jpg
Y:\Out\1\2\3\3.jpg

I have tried various versions of output folder, something like "Y:\Out\{d2}\{d1}\{d0}\" works but only as long as I have the same folder depth.

Is it possible to do what I'm trying to do, or do I have to ensure that I have the same depth through out my image tree?

Mario

You are using hard-coded indices (sections) from the path of the source file with your {d} patterns. But the number of path levels in the files you process seems to vary greatly. Folder patterns {d*} and {*p} allow you to splice levels from the beginning or end of the source path, but they require you to tell IMatch precisely how many levels to splice. And since you mix files with vastly different numbers of levels, this cannot work.

It appears to me that you just want to replace X:\images with Y:\Out in the output?
In that case, just use a variable to determine the output folder and replace as needed.

For example:

{File.Path|replace:C:\data==D:\photos}

applied to "C:\data\images\foo\image1.jpg" resolves to "D:\photos\images\foo\image1.jpg"
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

6b6561