Page 1 of 1

Combine match dir and synchronize browsing

Posted: 2009-09-13, 12:15 UTC
by Lefteous
It wpuld be great to have a command which does the following:
Left path: C:\Users\User1\Downloads\Backup
Right path: D:\Backup\Dir1\Dir2\Dir3\Dir4\Dir5

"Backup" left also contains the subdirs Dir1\Dir2\Dir3\Dir4\Dir5. So I want to go to C:\Users\User1\Downloads\Backup\Dir1\Dir2\Dir3\Dir4\Dir5 on the left side. So what I need now is a command which does that for me automatically. What do you think?

Posted: 2009-09-13, 13:56 UTC
by Balderstrom
Button:
Command: cmd /c CDL2R.cmd
Parameters: %X"%P" "%T"
CDL2R.cmd

Code: Select all

@ECHO OFF
:: CD Left to Right path
SET newDir=%~1..%~p2
REM ECHO newDir: %newDir%
START "" "%Commander_Path%\TotalCMD.exe" /O /L="%newDir%"

Posted: 2009-09-13, 14:01 UTC
by sqa_wizard
I don't know if I get it right.

Left path: C:\Users\User1\Downloads\Backup\Dir1\Dir2\Dir3\Dir4\Dir5
Right path: D:\Backup\Dir1\Dir2\Dir3\Dir4\Dir5

If I change into:
Left panel: C:\Users\User1\Downloads\Backup\
Right panel: D:\Backup\

Next step: enable cm_SyncChangeDir

Using left pane breadcrump clicking on "Dir4" the panels should show:
Left panel: C:\Users\User1\Downloads\Backup\Dir1\Dir2\Dir3\Dir4\
Right panel: D:\Backup\Dir1\Dir2\Dir3\Dir4\

Anything like this ?

Posted: 2009-09-13, 14:08 UTC
by Balderstrom
That works sure, but Lefteous was talking about already being in the path on the right.
Thus if his current paths are:
Left path: C:\Users\User1\Downloads\Backup
Right path: D:\Backup\Dir1\Dir2\Dir3\Dir4\Dir5

Then my script above will change Left to:
C:\Users\User1\Downloads\Backup\Dir1\Dir2\Dir3\Dir4\Dir5

Posted: 2009-09-14, 16:00 UTC
by Lefteous
2Balderstrom
Thanks for the external solution. It proves that such a function is feasible. I hope there will be an external command in future TC versions.