Commandline invoke X2 to open a specific folder in each pane even when active instance running

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
Caveatrob
Member
Member
Posts: 40
Joined: 2008 Aug 01, 18:07

Commandline invoke X2 to open a specific folder in each pane even when active instance running

Post by Caveatrob »

I'm trying to make shortcuts to open xPlorer2 or activate a running instance and open up one folder in the left and one in the right. It seems to work fine if I invoke the executable with a left folder and right folder path and there is no xPlorer2 instance running. But when I do the same thing when xPlorer is running, it only uses the left folder path and opens it in the active pane. Is there a way to force the active running instance to apply the left and right folder with the commandline?

Example:

I have a Windows shortcut called "code" that I want to click to open xPlorer2 and show C:\code\specs in the left pane and c:\code\src in the right. I make the following shortcut:

Code: Select all

"C:\Program Files\zabkat\xplorer2\xplorer2_64.exe" "c:\code\specs" "c:\code\src"
If an active instance of xPlorer2 is running, xPlorer2 will open "c:\code\specs" in the left pane and leave whatever was in the right pane there. If I do not, it works as expected.
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1241
Joined: 2005 Oct 16, 19:09

Re: Commandline invoke X2 to open a specific folder in each pane even when active instance running

Post by FrizzleFry »

you could try using the /P command line switch to force a separate instance
otlaolap
Silver Member
Silver Member
Posts: 239
Joined: 2007 Aug 11, 21:37

Re: Commandline invoke X2 to open a specific folder in each pane even when active instance running

Post by otlaolap »

In the advanced settings editor on the "Layout Settings" tab, there is an option "Single window mode" with three possible choices. One of these is "Open new window (default)", another is "Always use one window", and the third is "Always open new tabs in a single window". I use the first (open new window), and I get new X2 windows whenever I launch a shortcut invoking X2 and pointing to a folder. (I prefer this to using tabs in a single window.)

Additionally, when I want to open a pair of files in a new window, I use the /2 option, which forces X2 to open in dual pane mode (see the user manual page 373, where it is described as the "/X" option with X equal to one or two).
Caveatrob
Member
Member
Posts: 40
Joined: 2008 Aug 01, 18:07

Re: Commandline invoke X2 to open a specific folder in each pane even when active instance running

Post by Caveatrob »

So it sounds like the /2 option would work regardless given the behavior I'm seeing and the configuration I have (same instance).
otlaolap
Silver Member
Silver Member
Posts: 239
Joined: 2007 Aug 11, 21:37

Re: Commandline invoke X2 to open a specific folder in each pane even when active instance running

Post by otlaolap »

Give it a try and see -- It works reliably for me. "xplorer2_64.exe /1 D:/ E:/" gives me one pane on D:, while "xplorer2_64.exe /2 D:/ E:/" gives me two panes on D: and E:. In the first dase (the /1 case), when I later use Ctrl+O to open the dual pane it opens immediately at E: (where the command line told it to be).
Post Reply