the root folder of the first parallel/sister structure is:
"d:\structure"
the root folder of the second parallel/sister structure is:
"x:\cloud\backup\structure"
The child content of both sister structures is implied to be identical.
The differences in paths are put in red, the identical parts are blue.
Goal:
Being within the first structure (opened in the TotalCommander active pane), let's say under the active path:
"d:\structure\level\sublevel"
I switch to the other pane and the above path becomes the target.
Now I want a parallel folder within the sister structure to be opened (in the TotalCommander now active pane) regarding the target.
So, the new active pane path should become as follows:
"x:\cloud\backup\structure\level\sublevel"
My approach:
- the target path in TotalCommander is represented by the %T variable.
- I take %T, skip its 2 characters, and then extract everything else, which should fall into syntax: %T~2
so, while %T returns: "d:\structure\level\sublevel\",
the %T~2 should return: "\structure\level\sublevel\",
- Then I take the part of a sister path that differs: "x:\cloud\backup"
- Those two together ("x:\cloud\backup" and %T~2) should give the desired result: x:\cloud\backup\structure
The final command is:
Code: Select all
cd x:\cloud\backup%T~2
Code: Select all
cd x:\cloud\backup\%T~3
So what I miss here.
What's the actual syntax?