Page 1 of 1

command line startup parameter for selected file?

Posted: 19 Feb 2010, 21:20
by rpnfan
Hi,
I'm using 'everything' to index my HD in realtime and want to be able to start Salamander from there (via the command line options) with the wanted folder and the option to select a file there already. I can open the folder (-A option), but I don't see how I can put the focus on a specific file when starting from the command line.

I want to do the same like someone did for Total Commander: http://forum.voidtools.com/viewtopic.php?f=5&t=303

Looking forward any ideas / pointes :-)

Re: command line startup parameter for selected file?

Posted: 19 Feb 2010, 22:02
by Jan Rysavy
It looks like passing file path in Salamander startup parameter -L / -R is not supported.

I will move your idea to Feature Requests section.

Re: command line startup parameter for selected file?

Posted: 19 Feb 2010, 22:28
by rpnfan
Jan Rysavy wrote:It looks like passing file path in Salamander startup parameter -L / -R is not supported.

I will move your idea to Feature Requests section.
Jan, this is great. Looking forward to see this added. So in essence this would allow a similar function of pressing the "focus" button from the search function. The function is always there :-) "Just" needs a hook to the CLI.

BTW, 'everywhere' is an incredibely fast and good search. A direct integration of 'everywhere' in the Salamander search would be a dream :)

Thanks, Peter

Re: command line startup parameter for selected file?

Posted: 19 Feb 2010, 23:03
by therube
It looks like passing file path in Salamander startup parameter -L / -R is not supported.
If I'm understanding correctly, Salamander can open a directory named on the command line.

But Salamander cannot accept a directory name being passed to it from another application.

(Oh, that's kind of confusing in my head, but I think I understand the difference between the two.)

Yes, Everything is a great little program (just like another program we all use ;-)).
I too was not able to get Everything to open the expected directory in Salamander.
Messed around with it quite a bit, but never thought it was anything on Salamander's end that was the cause.
(I'll have to check my notes later.)

Salamander would open, that was no problem, but not the expected directory.

Now I kind of understand why.

Launch Salamander from ultra-fast search program'everything.

Posted: 20 Feb 2010, 22:10
by rpnfan
To use Salamander with 'everything.exe' (better said to launch Salamander from the context menu of everything

1. close 'everything.exe'

2. add the following lines to the everything.ini file at the end and save the ini file
(change path according your path, relative paths should work, but I have not tried, see everything forums if needed)

Code: Select all

open_folder_command=$exec("C:\Programme\Altap Salamander 2.52\salamand.exe" -A "%1")
open_folder_path_command=$exec("C:\Programme\Altap Salamander 2.52\salamand.exe" -A "$parent(%1)")
3. restart 'everything.exe' of course ;)

This will cause the right-click context menu to behave like this:

1) If you are on a folder
a) 'open' -> will start Salamader inside the folder
b) 'open path' -> will start Salamander with the folder _above_ the specified folder

2) If you're on a file
a) 'open' -> will do the same as double-clicking on the file (normally launch the associated application)
b) 'open path' -> will start Salamander with the folder which includes the specified file

For convinience and to speed up (especially in big directories) I want be able to start Salamander like 1a) 1b) and 2b), but with the specified file / folder already selected (like 'focus' does from the Salamander search)

If you want to specify opening Salamander with special left and / or right folder use the -L and or -R switch in the above lines for the ini file. Also if you want to have only one instance you can do this by adding the -O option.

Re: command line startup parameter for selected file?

Posted: 09 Mar 2010, 15:10
by Petr Solin
I have fixed this problem, the file is focused in panel as expected. It will be available in version 2.53 (approx. in two weeks).