How to open XYplorer with a passed/pre-defined folder?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
pstein
Posts: 71
Joined: 11 Dec 2021 21:11

How to open XYplorer with a passed/pre-defined folder?

Post by pstein »

When I double click on XYplorer.exe then it opens by default the last remembered directory.
Thats fine for most of the time.

However occasionally I would like to open+jump immediately to another directory.
This directory should automatically be selected in the TreeView on the left and opened in DetailsView on the right pane.

Built-in Windows Explorer offers for such a purpose the command line command:

Code: Select all

%windir%\explorer.exe /n,/e,D:\data
How can I achieve this for XYplorer?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: How to open XYplorer with a passed/pre-defined folder?

Post by highend »

By creating a shortcut to XYplorer.exe > XYplorer.exe.lnk
and in the target box of it's properties use a /script command line argument

Code: Select all

"{XYplorer's installation path}\XYplorer.exe" /script="::focus 'P2'; tab('new', '{the full path to open}'); #302;"
One of my scripts helped you out? Please donate via Paypal

pstein
Posts: 71
Joined: 11 Dec 2021 21:11

Re: How to open XYplorer with a passed/pre-defined folder?

Post by pstein »

Thank you for the suggestion but it didn't work.

I created a shortcut with the following target string:

D:\tools\XYplorer\XYplorer.exe /script="::focus 'P2'; tab('new', 'D:\data'); #302;"

Yes, this opens XYplorer but without selection of D:\data folder
Instead D:\ is selected

Whats wrong?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: How to open XYplorer with a passed/pre-defined folder?

Post by highend »

Does the exact same line work if you paste it into a command prompt and execute it there?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: How to open XYplorer with a passed/pre-defined folder?

Post by admin »

Just append the desired path:

Code: Select all

XYplorer startuppath
For example:

Code: Select all

C:\Program Files (x86)\XYplorer\XYplorer.exe C:\
See Help / Command Line Switches / Startup Path.

pstein
Posts: 71
Joined: 11 Dec 2021 21:11

Re: How to open XYplorer with a passed/pre-defined folder?

Post by pstein »

Ok, thank you.

One more related question:

How can I tell XYplorer to remember the last/currently marked directory beyond exit+restart?

As far as I can see enabling checkbox in

Configuration---> General--->Startup&Exit--->Save Settings--->Save settings on exit

does NOT remember current path.
It always starts with "Computer" as top node

How can I achieve remembering otherwise?

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: How to open XYplorer with a passed/pre-defined folder?

Post by admin »

Weird. Check your settings again. XY remembers everything unless you explicitly tell it to forget certain things.

Post Reply