Changing directory in panel with command

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Nux
Junior Member
Junior Member
Posts: 40
Joined: 2009-04-19, 08:05 UTC

Changing directory in panel with command

Post by *Nux »

Is it possible to change directory in a panel by running some command? I know about CD but I'd like to change to directory given by other command (e.g. returned in stdout).

Specifically what I want to do is make a toolbar button that would move me to the original directory pointed by junction rather then going into the "wirtual" directory. I already know how to get orignal path in Python I only need to pass the path to CD or whatever command.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Code: Select all

"%COMMANDER_EXE%" /O /S /L="your path"
TOTALCMD.CHM, Section 4.b.
Nux
Junior Member
Junior Member
Posts: 40
Joined: 2009-04-19, 08:05 UTC

Post by *Nux »

Thanks! It works :-). I've published the script here:
http://pastebin.com/uWkxK24b

Button:
cmd=python
param=cdJunction.py %P%S
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

That's great. :)
BTW you can use %P%N instead of %P%S since you need only one path and not paths of all selected objects.
Post Reply