How can one open a file or folder in the search result in FreeCommander being already open?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

How can one open a file or folder in the search result in FreeCommander being already open?

Post by Biff »

How can one open a file or folder in the search result in the portable FreeCommander (https://freecommander.com/de/portable-downloads/) being already open (not in a new instance)?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by NotNull »

Code: Select all

"C:\path to\FreeCommander.exe" /C /Z /L="c:\some folder\some file.txt"
The /C makes it open in a running instance of FreeCommander
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Biff »

Many thanks!

Sorry, where do I have to put this? In the EverythingFileAssociations.ini? Or somewhere in Everything? And "some folder", "some file" has to be exchange with what? Sorry for my bad inability.

"J:\Programme\FreeCommander\FreeCommander.exe" /C /Z /L="c:\some folder\some file.txt"
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by NotNull »

In Everything:
Menü:Extras > Einstellungen > Allgemein > Kontextmenü:
Öffnen (Ordner) =
$exec("J:\Programme\FreeCommander\FreeCommander.exe" /C /Z /L="%1")
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Biff »

Oh, a different code.

Many thanks, got it working.

Can one use a shortcut to open the folder?
And is there a way to open the folder of a selected file?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by NotNull »

Biff wrote: Fri Mar 11, 2022 5:18 pm Can one use a shortcut to open the folder?
Typically, that would be the ' ENTER' key.


Biff wrote: Fri Mar 11, 2022 5:18 pm And is there a way to open the folder of a selected file?
In Everything:
Menü:Extras > Einstellungen > Allgemein > Kontextmenü:
Pfad Öffnen =
$exec("J:\Programme\FreeCommander\FreeCommander.exe" /C /Z /L="%1")



Shortcuts can be configured under Menu:Tools > Options > General > Keyboard
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Biff »

Ah, very great, all works fine. If only I had asked earlier. Holy....the Enter key, yes, of course, sorry, or double click. Thank you very much!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by NotNull »

Sorry for being very brief in my responses; I was in a hurry. You deserved a more detailed explanation.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Biff »

No no, absolutely no reason for sorry. On the contrary, many (much more) thanks for answering although being in a hurry! And it doesn't happen that often (for me) that something works so quickly.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by NotNull »

OK, so luckily no puppies were harmed in the process ;)


BTW: 'CTRL + ENTER' opens the path of a file in FreeCommander. The filename itself will be pre-selected.

And when you enable "Open path with double click in path column" (under Options > General > Results ), you can do exactly that - Open path with double click in path column - as a mouse alternative to 'CTRL + ENTER'
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Biff »

Yes yes, all puppies are feeling good.
BTW: 'CTRL + ENTER' opens the path of a file in FreeCommander. The filename itself will be pre-selected.

BTW: 'CTRL + ENTER' opens the path of a file in FreeCommander. The filename itself will be pre-selected.

And when you enable "Open path with double click in path column" (under Options > General > Results ), you can do exactly that - Open path with double click in path column - as a mouse alternative to 'CTRL + ENTER'
Ah, that is great! Unbelievable, some of the most important shortcuts (and option(s)) I didn't know (instead acting extremely laboriously).

Thank you very much!
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Thy Grand Voidinesss »

NotNull wrote: Fri Mar 11, 2022 3:30 pm In Everything:
Menü:Extras > Einstellungen > Allgemein > Kontextmenü:
Öffnen (Ordner) =
$exec("J:\Programme\FreeCommander\FreeCommander.exe" /C /Z /L="%1")
Unfortunately, this solution apparently does not work when there are pauses in the path. My version is

Code: Select all

$exec("C:\Program Files (x86)\FreeCommander XE\FreeCommander.exe" /C /Z /L="%1")
and I get this pop-up window informing about error - of not being able to find
'C:\Program Files (x86'


I tried multiple variations of writing the path and changing the variables at the end and also more than menu Menu Context Item [i.e. Open Path, explore Path etc.]. It was not working with earlier versions of Everything and of FreeCommander - and now it spills that error in Everything 1.4.1.1015 (x64) with FreeCommander Build 861 32-bit public on Windows 10 Enterprise 20H2 19042.746
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by NotNull »

The reason why this didn't work as expected is revealed when you hover the mouse above the command box:
2022-06-08 23_05_00-Window.png
2022-06-08 23_05_00-Window.png (11.41 KiB) Viewed 5839 times

You need to replace the ( and ) in the path with $( and $) respectively.
So this should work (untested):

Code: Select all

$exec("C:\Program Files $(x86$)\FreeCommander XE\FreeCommander.exe" /C /Z /L="%1")
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Thy Grand Voidinesss »

It worked, thank you

I was suspecting it had something to do with >>(<< and >>)<<; prior to that I tried doubling them and putting in quotes


For my modus operandi I need to use Open Path with

Code: Select all

$exec("C:\Program Files $(x86$)\FreeCommander XE\FreeCommander.exe" /T /L="%1")
and Explore Path with

Code: Select all

$exec("C:\Program Files $(x86$)\FreeCommander XE\FreeCommander.exe" /T /R="%1")
so that I will have a conscious choice of being able to see the path opened either on my left or right Panel of FreeCommander. And I had to get rid of >>/C<< and >>/Z<<, as they were causing both Open Path and Explore Path to ignore this difference and open in the chosen Panel only every other time, thus creating chaos. And I could do that because FC is my go-to file-manager thus is constantly running. The whole list of FC command line parameters is available here https://freecommander.com/fchelpxe/en/C ... eters.html - and thus it seems that it is impossible to open path in the currently active Panel because these below do not work

Code: Select all

$exec("C:\Program Files $(x86$)\FreeCommander XE\FreeCommander.exe" /T="%1")

Code: Select all

$exec("C:\Program Files $(x86$)\FreeCommander XE\FreeCommander.exe")
but that is not that important of an additional choice to have. What I would rather be able to do is to use Open Path and Explore Path with the file that was chosen being shown if FreeCommander as selected. Yes I know- I can do it with CTRL being pushed down or just by double clicking it in the Path Column, but it is not the same [being not user-friendly all the way because the first method requires using a keyboard while the second always uses the Left Panel]
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by horst.epp »

The following parameters are working perfect for me with an already running FC.
It switches to the folder or file in the active side.
The item from the search result is selected (for files) or entered (for folders).
/C /Z /L="%1"
Thy Grand Voidinesss
Posts: 691
Joined: Wed Jun 01, 2022 5:01 pm

Re: How can one open a file or folder in the search result in FreeCommander being already open?

Post by Thy Grand Voidinesss »

Well now

Code: Select all

$exec("C:\Program Files $(x86$)\FreeCommander XE\FreeCommander.exe" /C /Z /T /L="%1")
seems to be working A-OK, i.e. without that switching form left to right. Maybe earlier I had typo of some sort, like a pause or something
Post Reply