Page 1 of 1

Problem with Parent Folder

PostPosted: Sun Mar 05, 2017 3:09 pm
by learned
I was hoping that Parent Folder would only give me the name of the exact parent folder. For example, if I have a folder:

/Users/me/TargetFolder/file.txt

I was hoping that ParentFolder would give only TargetFolder. Instead it appears to give the entire path. Is there a way to just get the name of the immediate containing folder? I want to use it in rename actions for files in that folder.

Re: Problem with Parent Folder

PostPosted: Mon Mar 06, 2017 12:20 pm
by Mr_Noodle
You can do something like this:
Code: Select all
    If (all) match
        If (all) match for (the enclosing folder)
            Name matches (•parent name)

where •parent name is set to match "anything". What that does is capture the parent folder name into the •parent name custom attribute you create. You can then use that in patterns afterwards.