Token for parent folder name

Hi Leo,

In Help, I can read:
Normally tabs display the name of the folder they are showing, but if you click the left button on the label of the currently active tab, you are able to assign your own name to the tab. Once a tab has an assigned name it will not change even if you change folders in the tab. You can use several special "tokens" to insert information in the tab label:

    %P - full path of the current folder
    %N - name of the current folder
    %R - drive root of the current folder
    %% - insert a literal % character

Would it there be any token for "Name of the parent folder"?

I would use it in a quick action to rename the current folder tab to its parent folder name and it will remain as current folder tab name even though I open any of its subfolders.

It would be helpful when I manage a work folder with subfolder(s) and I want its name always to be displayed as tab's name.

Any other suitable solution would be welcome.

Many thanks in advance.

You would not want to use a token in that case, since the whole point of tokens is that they get re-evaluated when you change folders. It would always show the current folder's parent, not the one you wanted to lock in.

Instead, run a command like this:

>Go TABNAME "{sourcepath|..|nopath|noterm} - %N"

That will lock in the current folder's parent as part of the name, and also show the current folder's name after it.

Remove the ..| if you wanted the current folder's name rather than its parent's name.

Thanks again. It works.