%Comspec% for Internal association: *.cmd, *.bat, *.reg
Moderators: white, Hacker, petermad, Stefan2
%Comspec% for Internal association: *.cmd, *.bat, *.reg
Here you have my Association:
Filter3=*.cmd; *.bat; *.inf; *.vbs; *.reg
Filter3_open=*
Filter3_Open with &Notepad2=""%commander_path%\prg\notepad2.exe" "%1""
Filter3_Open with &PsPad=""%commander_path%\..\pspad\pspad.exe" "%1""
Filter3_Open with Notepad&++=""%commander_path%\..\notepad++\notepad++.exe" "%1""
Filter3_Run=%comspec% /c "%1"
The abnormal behavior is with RUN command.
First time, the file under cursor is run with current path (from active panel) and after that the path used is from opposite panel and never came back.
Try this, make test.cmd with folowing content:
[test.cmd]
dir
pause
:eof
I didn't remark this until now (TC 7.5 RC1).
Normal behavior is like command line. For example , dir is related to the active path.
Filter3=*.cmd; *.bat; *.inf; *.vbs; *.reg
Filter3_open=*
Filter3_Open with &Notepad2=""%commander_path%\prg\notepad2.exe" "%1""
Filter3_Open with &PsPad=""%commander_path%\..\pspad\pspad.exe" "%1""
Filter3_Open with Notepad&++=""%commander_path%\..\notepad++\notepad++.exe" "%1""
Filter3_Run=%comspec% /c "%1"
The abnormal behavior is with RUN command.
First time, the file under cursor is run with current path (from active panel) and after that the path used is from opposite panel and never came back.
Try this, make test.cmd with folowing content:
[test.cmd]
dir
pause
:eof
I didn't remark this until now (TC 7.5 RC1).
Normal behavior is like command line. For example , dir is related to the active path.
My Best Wishes,
Eugen
Eugen
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
-
- Power Member
- Posts: 556
- Joined: 2006-04-01, 00:11 UTC
I had something similar, I set up an Internal association to extract rar archives and keep broken files and it works, but it always extracts the file in the opposite panel and I can't get it to use the same path as the archive...
Maybe it would be nice to introduce %P & %T (source and target panels) for Internal Associations, just like the button bar parameters?
Code: Select all
"%COMMANDER_PATH%\..\WinRAR\rar.exe" x -kb "%1""
Maybe it would be nice to introduce %P & %T (source and target panels) for Internal Associations, just like the button bar parameters?
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
The best OS: Win2K :=)
@ WhACKO, that may be TC's Unpacking preference behaviour coming into play, when you unpack w/ TC it always defaults to the other panel. The inability to set this behaviour aside from multiple steps of deleting the "Path" in the popup confirmation among others has caused me to only unpack via the context menu.
That same thing, does work from a button:
Command: C:\Program Files\WinRAR\WinRAR.exe x -kb
Parameters: %S
@ WhACKO, that may be TC's Unpacking preference behaviour coming into play, when you unpack w/ TC it always defaults to the other panel. The inability to set this behaviour aside from multiple steps of deleting the "Path" in the popup confirmation among others has caused me to only unpack via the context menu.
That same thing, does work from a button:
Command: C:\Program Files\WinRAR\WinRAR.exe x -kb
Parameters: %S
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
-
- Power Member
- Posts: 556
- Joined: 2006-04-01, 00:11 UTC
2Balderstrom
It seems to be, that you are not understood, eugensyl and WhACKO are talking about Internal associations, not buttons.
2eugensyl
Under Windows7 X64 an opposite panel is always used with your settings.
2WhACKO
An interesting idea . I support. It could save many hotkey combinations for em_commands due to wildcard flexibility.
It seems to be, that you are not understood, eugensyl and WhACKO are talking about Internal associations, not buttons.
2eugensyl
Under Windows7 X64 an opposite panel is always used with your settings.
2WhACKO
An interesting idea . I support. It could save many hotkey combinations for em_commands due to wildcard flexibility.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
-
- Power Member
- Posts: 556
- Joined: 2006-04-01, 00:11 UTC
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
OK well I still can't reproduce, with Win2K.
OPEN: %Comspec% /k dir
Internally associated with .txt files, always shows the activePane's directory.
OR:
OPEN: "E:\Program Files\¤EDITors\NotePad2\Notepad2.exe" "%1"
Additional option added:
RUN: %Comspec% /k dir
RUN2: %Comspec% /k dir %1
The directory shown for both RUN options is always active pane.
OPEN: %Comspec% /k dir
Internally associated with .txt files, always shows the activePane's directory.
OR:
OPEN: "E:\Program Files\¤EDITors\NotePad2\Notepad2.exe" "%1"
Additional option added:
RUN: %Comspec% /k dir
RUN2: %Comspec% /k dir %1
The directory shown for both RUN options is always active pane.
Last edited by Balderstrom on 2009-08-17, 00:38 UTC, edited 1 time in total.
-
- Power Member
- Posts: 556
- Joined: 2006-04-01, 00:11 UTC
Simply say, that you don`t want test orderly. What are you want to see, when loading txt-file into command shell?! Please, don`t spam the thread, if you don`t want tests correctly.Balderstrom wrote:OK well I still can't reproduce, with Win2K.
OPEN: %Comspec% /k dir
Internally associated with .txt files, always shows the activePane's directory.
XP SP3Postkutscher wrote:2eugensyl
2Balderstrom
What OS are you using?
I have tried to another computer and the behavior is the same. This occur when the same file (test.cmd) is launched several times and between runs I switch to different TC tabs.
It's seem as path focus is lose after few runs of %comspec% from internal command.
It happens ONLY when the path from opposite panel is changed and after all I return to the test.cmd folder.
Never happens with a button bar (%comspec% /c %P%N) or command line (Ctrl+ENTER, ENTER).
My Best Wishes,
Eugen
Eugen
- ghisler(Author)
- Site Admin
- Posts: 48231
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, I don't understand the problem. What does the current path matter here?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I can confirm the bug - just do as described in the first post - make an internal association like:
X depends on the number of existing associations.
Make a file: test.cmd with this content:
Doubleclick on test.cmd and choose Run.
The first time the files in the current file panel are listed in the console (as expected), but thereafter when running test.cmd this way the files in the opposite file panel are listed in the console window. Really weird!
If you leave the current folder and go back into it, or if you press Ctrl+R you can reset the Run once, whereafter it continues to list the opposite panel - even if you change directory in the opposite panel.
It only happens if you Run test.cmd from the left panel, not from the right panel!
It also only happens when using cm_ContextMenuInternalCursor/cm_ContextMenuInternal (DoubleClick or Enter), but NOT with cm_ContextMenu (Right click or Shift+F10)
Code: Select all
FilterX=*.cmd
FilterX_open=*
FilterX_Open with &Notepad=""notepad.exe" "%1""
FilterX_Run=%comspec% /c "%1"
Make a file: test.cmd with this content:
Code: Select all
dir
pause
:eof
The first time the files in the current file panel are listed in the console (as expected), but thereafter when running test.cmd this way the files in the opposite file panel are listed in the console window. Really weird!
If you leave the current folder and go back into it, or if you press Ctrl+R you can reset the Run once, whereafter it continues to list the opposite panel - even if you change directory in the opposite panel.
It only happens if you Run test.cmd from the left panel, not from the right panel!
It also only happens when using cm_ContextMenuInternalCursor/cm_ContextMenuInternal (DoubleClick or Enter), but NOT with cm_ContextMenu (Right click or Shift+F10)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 48231
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK I could confirm it too now: TC doesn't explicitly set the current path when using a menu (_open=* option), otherwise it does set it. I will change that.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com