Imatch Batch Processor file name

Started by stefanjan2, October 05, 2025, 07:06:02 PM

Previous topic - Next topic

stefanjan2

I am trying to work out how to extract "White Rhino" from:
E:\Photos\2025\2025-07-23 ¦ Whipsnade Zoo Photofold Outing\2025-07-23 ¦ White Rhino\Processed\

{d1}{seq} gives me a file name "2025-07-23 ¦ White Rhino002" but I'd like the file name to be White Rhino002 so drop the first part up to " ¦"

I'm sure this possible but I couldn't find anywhere in help to work out how to do this. Could someone point me in the right direction.

Mario

Folder patterns cannot remove parts of folder names.
Use a variable instead, with the replace:This==That function to replace White Rhino with nothing.

stefanjan2

Quote from: Mario on October 05, 2025, 07:10:58 PMFolder patterns cannot remove parts of folder names.
Use a variable instead, with the replace:This==That function to replace White Rhino with nothing.
It's not "White Rhino" I want to replace with nothing, it's everything that comes before "White Rhino" so I don't want the date & " ¦ " in the file name or in other words drop the first 12 characters in the parent folder name to use when creating a file name in the Image Batch Processor.

Mario


stefanjan2

Tha
Quote from: Mario on October 06, 2025, 09:05:33 AMUse substr with a variable then.
{File.MD.file.foldername|substr:13} removes the first 13 characters of the full path.
I've tried using vartoy to use {d1} in this expression to remove the first 13 characters of the parent folder but can't figure out how to do that.

Mario

#5
VarToy does not know about folder patterns. Folder patterns are only processed by certain IMatch features.
I don't see a way to do what you want. Maybe try findreverse to find the \ and then substrr to remove a certain number of characters before the \

stefanjan2

Quote from: Mario on October 06, 2025, 09:56:01 AMMaybe try findreverse to find the \ and then substrr to remove a certain number of characters before the \
That's not going to work as that finds the \ for folder \Processed rather than the parent folder in \2025-07-23 ¦ White Rhino\Processed\

I think actually a simpler solution will be to make sure the Headline field is populated and then use that for the File Name in the Image Batch Processor {File.MD.headline} - {seq}

Actually that's a better solution as that allows me to have different file names within the same folder.