Intergrate Q-Dir with open path

General discussion related to "Everything".
Post Reply
void
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Intergrate Q-Dir with open path

Post by void »

To change the open path command for Everything:
  • In "Everything", from the Tools menu, click Options.
  • Click the Context Menu tab.
  • Select Open Path
  • Change command to:

    Code: Select all

    $exec("C:\Program Files\Q-Dir\Q-Dir.exe" /e>$pathpart(%1))
  • Click OK.
Thanks to Sunil.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

I have adapted / tried to adapted the path to my Q-Dir, but I cannot get it to work: http://i.imgur.com/ePFa5Bx.png

Q-Dir opens, but without showing the folder the path leads to. How could I correct it?

If I would mark 2, 3 or 4 folders and clicked "Open path" in the context menu how could I make Everything show each single folder in a single panel of Q-Dir?
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Intergrate Q-Dir with open path

Post by therube »

@Biff, you're missing the ending paren, ')'.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

Oh, sorry, that field is to short to show its entire content, the ")" is inserted, but not shown, this code is added: $exec("I:\Q-Dir\Q-Dir.exe" /e>$pathpart(%1))

But it does not work for me.

Thank you, therube
horst.epp
Posts: 1447
Joined: Fri Apr 04, 2014 3:24 pm

Re: Intergrate Q-Dir with open path

Post by horst.epp »

I guess it doesn't work because the > in /e>
May be it should be /e=
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

Thank you, horst,epp.

No, it does not work with the "=":

Code: Select all

$exec("I:\Q-Dir\Q-Dir.exe" /e=$pathpart(%1))
Thanks again.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Intergrate Q-Dir with open path

Post by therube »

I don't know what the "/e>" is doing at all, & it seems odd?

I don't think that $pathpart(%1) is correctly handling paths with spaces?
I seem to only be getting the part before the space.
So "C:\TMP\ABC 123" returns "C:\TMP\ABC".

A path without a space should work with this:

Code: Select all

$exec(c:\Q-DIR\Q-dir.exe  $pathpart("%1"))
It might be easier to pass %1 to a batch file that then calls Q-dir.exe.
And instead of using $pathpart in the original call, you can (a unix-like) dirname.

SET DIRNAME=dirname(%1)

Then

Q-dir.exe %DIRNAME%

(Q-Dir's website wasn't too much help either ;-).
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

Many thanks for the code, therube.

Unfortunately I do not get it to work. The same behavior.
It might be easier to pass %1 to a batch file that then calls Q-dir.exe.
And instead of using $pathpart in the original call, you can (a unix-like) dirname.

SET DIRNAME=dirname(%1)

Then

Q-dir.exe %DIRNAME%

(Q-Dir's website wasn't too much help either ;-).
Very sorry, I do not have any idea of how to build such code. I just saw this post and thought, that is a very good opportunity to just copy and paste it to Everything to use Q-Dir, but....I rather will leave it like it is.

Many thanks anyway.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Intergrate Q-Dir with open path

Post by therube »

Create a batch file, I called it GO.BAT.
Place it in your path, or in Q-Dir's instalDir.


GO.BAT:

Code: Select all

FOR   %%I in (%1)  do  SET DIRNAME=%%~dpI
START  Q-Dir.exe "%DIRNAME%"
EXIT
Set the command for 'Open Path' in Everything (Tools | Options | Context Menu) to read:

Code: Select all

$exec(C:\Q-Dir\GO.BAT "%1")

(Adjust names, paths as wanted, needed.)
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

Thank you very much, but I am sorry, I really have any idea what I have to do with that code. I do not understand at all. Very sorry again.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: Intergrate Q-Dir with open path

Post by therube »

Open Notepad
Copy the contents shown into it
Save As -> GO.BAT, placing it in into your Q-Dir directory.
(Wonder if that would be an issue with Windows "protections"?)

Change the Everything option as shown.

Try it.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

Great, I have it working now, many thanks.
Biff
Posts: 1158
Joined: Mon May 25, 2015 7:09 am

Re: Intergrate Q-Dir with open path

Post by Biff »

When you mark more than one folder, e.g. 3 ones, how could one let Everything open one Q-Dir opening each of the 3 folders in a single panel instead of opening 3 Q-Dir showing each folder in the left panel on top?
Post Reply