Hi everyone!
My respect goes to the author and all the community here!
I've got a rather specific question.
There are some programs which provide an "Open containing folder" context menu (download managers, for example). Is it possible to programmatically redirect (or re-implement) this action to a Total Commander instance?
I do not know if I need to write a plugin for that purpose, but how can this be achieved? My new project requires that I incorporate an "Open containing folder" feature for some arbitrary files. If Total Commander is found on the machine, then the target file must be selected in the active panel of the topmost Total Commander instance (just the same way like it is done in Explorer). The necessary change folder operation should be completed if the file path requires it.
Is there a way to do that, and if yes, then how can it be achieved?
I can rely on pure C++ and WinAPI wherever needed, but no managed code.
Thanks in advance. Hoping to hear from you soon.
Best regards,
Vitaly Demin aka LightGreen.
------------------------------------------------------------
Sometimes programming is hard, but it is rewarding.
Open folder + select file
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 2
- Joined: 2008-07-25, 18:24 UTC
Thanks, that's great! So it is possible to run the total commander and make it open the desired folder. But the two problems still remain:Hacker wrote:Hello,
Explorer integration
1) the folder gets open in the default panel (left or right), not the currently active panel
2) the file is not selected, like in "explorer /select, c:\windows\notepad.exe",
Could you please give me a clue how to do that

Thanks,
Vitaly.
2LightGreen
A good explanation for command line parameters is in help file section 4-a.
A good explanation for command line parameters is in help file section 4-a.
Yes the file is not selected, but can be focused if you pass the full path with filename.the file is not selected, like in "explorer /select, c:\windows\notepad.exe",
I can read English, but... I write like Tarzan. (sorry)
The file is only focused if it's not a TC supported archive, either internally or by packer plugin, otherwise it is entered.Yes the file is not selected, but can be focused if you pass the full path with filename.
To prevent that, in case of a packer plugin extension, tweak the packer with Plugman – http://www.totalcmd.net/plugring/tc_plugman.html – uncheck "Don't open with Enter but with Ctrl PgDn". Manually subtracting 256 from the number in front of the packer in wincmd.ini also does the job.
If you want to select a file, this can be done with external scripting, AHK for example. If you wanna use C++, check that:
http://www.ghisler.ch/wiki/index.php?title=Addon_library
All you need is to do is to parse the directory from the given file path, then change directory in TC, then select the file by directly manipulating the TC listbox with LB_SETSEL.
Icfu
This account is for sale