Open folder in other pane with fix path-part + current path?
Moderators: white, Hacker, petermad, Stefan2
Open folder in other pane with fix path-part + current path?
Sugguest TC have map function to jump to certain folder. (Subject line modified by Mod)
That is,
as an example,currently I am in dir "c:\Program Files\EverEdit 4.0\mode"
As I have been copy tree to some other dir,or use some software like sandbox.
So,I need to goto certain dir related to it,somewhat like "c:\Sandbox\Administrator\DefaultBox\drive\C\Program Files\EverEdit 4.0\mode"
and it can do so.
currently,I may use AHK or some copyenhance tools to do so.
but maybe it's a funny function to add to TC
best regards
That is,
as an example,currently I am in dir "c:\Program Files\EverEdit 4.0\mode"
As I have been copy tree to some other dir,or use some software like sandbox.
So,I need to goto certain dir related to it,somewhat like "c:\Sandbox\Administrator\DefaultBox\drive\C\Program Files\EverEdit 4.0\mode"
and it can do so.
currently,I may use AHK or some copyenhance tools to do so.
but maybe it's a funny function to add to TC
best regards
______________________
#147708 Personal licence
#147708 Personal licence
I still don't get it.
Do you need to switch to related, dynamically from current folder build paths?
If in "c:\Program Files\EverEdit 4.0\mode"
switch to "c:\Sandbox\Administrator\DefaultBox\drive\c\Program Files\EverEdit 4.0\mode"
If in "c:\Work\ABC"
switch to "c:\Sandbox\Administrator\DefaultBox\drive\c\Work\ABC"
Do you need to switch to related, dynamically from current folder build paths?
If in "c:\Program Files\EverEdit 4.0\mode"
switch to "c:\Sandbox\Administrator\DefaultBox\drive\c\Program Files\EverEdit 4.0\mode"
If in "c:\Work\ABC"
switch to "c:\Sandbox\Administrator\DefaultBox\drive\c\Work\ABC"
Last edited by Stefan2 on 2017-06-23, 18:12 UTC, edited 1 time in total.
There is no generic way to know how many levels you need to skip and which folder should become new root, so you can only use external ways like mentioned AHK scripts.
And such script should get three parameters: source root (e.g. C:\ in your example), target root (e.g. c:\Sandbox\Administrator\DefaultBox\drive\C) and source path (e.g. c:\Program Files\EverEdit 4.0\mode), only with these three values we can get the fourth one, target path.
So you will need multiple buttons/commands for different pairs of roots.
And such script should get three parameters: source root (e.g. C:\ in your example), target root (e.g. c:\Sandbox\Administrator\DefaultBox\drive\C) and source path (e.g. c:\Program Files\EverEdit 4.0\mode), only with these three values we can get the fourth one, target path.
So you will need multiple buttons/commands for different pairs of roots.
DOS-Batch: modify path and open in other panel
I think that could be done by utilizing a script like that over there:
http://ghisler.ch/board/viewtopic.php?p=304419#304419
Here adopted / modified for your purpose:
... switch to related, dynamically from current folder build paths:
If in "c:\Program Files\EverEdit 4.0\mode"
switch to "c:\Sandbox\Administrator\DefaultBox\drive\c\Program Files\EverEdit 4.0\mode" in other panel.
HTH?
http://ghisler.ch/board/viewtopic.php?p=304419#304419
Here adopted / modified for your purpose:
... switch to related, dynamically from current folder build paths:
If in "c:\Program Files\EverEdit 4.0\mode"
switch to "c:\Sandbox\Administrator\DefaultBox\drive\c\Program Files\EverEdit 4.0\mode" in other panel.
Code: Select all
@ECHO OFF
REM Batch for Total Commander
REM Modify path and open in other panel
REM Build dynamically new path from fix prefix plus current folder.
REM Found at http://ghisler.ch/board/viewtopic.php?p=324995#324995
REM
REM Stefan, 2017-02-09
REM Usage:
REM Create a TC button
REM CMD: path\to\this\SyncPath.cmd
REM PARAM: "%P"
SET "FixPrefix=c:\Sandbox\Administrator\DefaultBox\drive\"
ECHO FixPrefix: %FixPrefix%
REM CurrPath from TCs "%P" parameter:
SET "CurrPath=%~1"
ECHO CurrPath : %CurrPath%
SET "CurrPath=%CurrPath::=%"
ECHO CurrPath : %CurrPath%
SET "TARGET=%FixPrefix%%CurrPath%"
ECHO TARGET : %TARGET%
ECHO GO: Open new path in other (target) panel:
ECHO "%Commander_Exe%" /O /S /R="%TARGET%"
rem "%Commander_Exe%" /O /S /R="%TARGET%"
PAUSE
GoTo :EOF
R E S U L T ..... DOS-Box shows:
FixPrefix: c:\Sandbox\Administrator\DefaultBox\drive\
CurrPath : C:\Temp\ToCmd\Test\
CurrPath : C\Temp\ToCmd\Test\
TARGET : c:\Sandbox\Administrator\DefaultBox\drive\C\Temp\ToCmd\Test\
GO: Open new path in other (target) panel:
"X:\Tools\ToCo\TOTALCMD.EXE" /O /S /R="c:\Sandbox\Administrator\DefaultBox\drive\C\Temp\ToCmd\Test\"
Drücken Sie eine beliebige Taste . . .
HTH?
Thanks,It is examctaly what I need.
I edit the batch files
change
'''
ECHO GO: Open new path in other (target) panel:
ECHO "%Commander_Exe%" /O /S /R="%TARGET%"
'''
to
'''
ECHO GO: Open new path in other (target) panel:
"%Commander_Exe%" /O /S /R="%TARGET%"
'''
and it works.
Thanks very much.you are so kind.
I edit the batch files
change
'''
ECHO GO: Open new path in other (target) panel:
ECHO "%Commander_Exe%" /O /S /R="%TARGET%"
'''
to
'''
ECHO GO: Open new path in other (target) panel:
"%Commander_Exe%" /O /S /R="%TARGET%"
'''
and it works.
Thanks very much.you are so kind.
Code: Select all
@ECHO OFF
REM Batch for Total Commander
REM Modify path and open in other panel
REM Build dynamically new path from fix prefix plus current folder.
REM Found at http://ghisler.ch/board/viewtopic.php?p=324995#324995
REM
REM Stefan, 2017-02-09
REM Usage:
REM Create a TC button
REM CMD: path\to\this\SyncPath.cmd
REM PARAM: "%P"
SET "FixPrefix=c:\Sandbox\Administrator\DefaultBox\drive\"
ECHO FixPrefix: %FixPrefix%
REM CurrPath from TCs "%P" parameter:
SET "CurrPath=%~1"
ECHO CurrPath : %CurrPath%
SET "CurrPath=%CurrPath::=%"
ECHO CurrPath : %CurrPath%
SET "TARGET=%FixPrefix%%CurrPath%"
ECHO TARGET : %TARGET%
ECHO GO: Open new path in other (target) panel:
"%Commander_Exe%" /O /S /R="%TARGET%"
rem "%Commander_Exe%" /O /S /R="%TARGET%"
______________________
#147708 Personal licence
#147708 Personal licence