Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Features wanted...
Post Reply
Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by Garonne »

Would it be possible to add an option so XYplorer stores its local drive (<xydrive> or ?:) in a portable way when saving tabs? Since I got XYplorer on a USB-Stick, the drive changes, when I switch computers, but the drive letter is saved absolutely (most cases) so I get a bunch of invalid paths.

If I could set an option that XY is installed portably (and XY will store all references to it's drive in a portable way) I could plug in the USB-Drive in any computer and my tabs would be fine.

Storing Tabs in this manner would be enough for me, but if you want you could extend it to other places where paths are stored, too.

Though I don't mind to not have it applied to anything else...

WirlyWirly
Posts: 306
Joined: 21 Oct 2020 23:33
Location: XY 64-Bit | Win 10 @ 100% (3440x1440)

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by WirlyWirly »

+1, not have portable tab paths is inconvenient when everything else such as CFA and CFI are fully portable.

In the mean-time, if you edit the <xypath>\Data\panes\tabset_name\pane.ini file in a text editor, you can replace the occurrences of drive letters such as C:\ with the variable <xydrive>.

example:

Code: Select all

...
D2=%userreal%\Downloads
...
D3=<xydrive>\PortableApps\PortableApps
...
I make extensive use of relative paths and XY variables in-order to keep my setup fully portable. Doing this has worked for me, though if you regularly update your tabsets you'll have to edit the ini file as-well.

A user-side solution to that is to make a script to quickly regex and replace the contents of pane.ini files with the <xydrive> variable where appropriate.

Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by Garonne »

Oh, that's not the easiest one.

Right-Click the Tab, Select "Relocate Tab…" from the Pop-Up and edit the Path.
But still sucks to do it nearly every time.

I already defined a - how did Don call those? The user defined Quick-Paths, similar to Desktop & Co. - to my portable disk, and this works, but I don't always remember to use those… Though actually I just figured, switching to that path actually keeps the "original" path (grayed out), so you can easily move to your sub-path again.

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

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by admin »

Isn't that possible since v9.40 (02-Aug-2010)?
https://www.xyplorer.com/release_9.40.php

Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by Garonne »

Sure, but, my question was, to optionally automatically convert the drive letter (say G:) to the portable options. If I access the mobile drive through the normal tree the path is stored as absolute path... including the absolute drive-letter. If I switch to a different computer (and didn't manually change the path to contain ? or <xydrive> or didn't use a specifically coded Rapid Access Folder, XY stores the paths including their drive letters.

Since I switched computers, the actual drive letter changed. If I did access a path using the folder tree "normally" (no RAF or manually changed paths) those tabs now still point to the "old" drive letter pointing to invalid paths.

I want XY to automatically (well, on save) check, if any paths are pointing to the current <xydrive> and automatically convert those to the portable versions of the path.

i.e.
Computer 1: USB-Drive is assigned to D:
If I access paths normally, they are displayed (and stored) as D:\xxx\yyy\zzz

After switching computers the USB-Drive is assigned to L:
All tabs not manually edited still point to D:\xxx\yyy\zzz and are invalid now.

I need to either relocare the tabs to point to "?:\xxx\yyy\zzz" which works independant of the computer I'm working on or use my RAF "PDrive -> ?:\" so XY stores the paths in a portable format.

On Ini Save/exit, I'd want XY to auto-convert all paths D:\xxx to ?:\xxx without me worrying.

This obviously only makes sense for people carrying XYplorer around like me, that's why I'd think this should be a toggle-able option because it's a performance waste on static installations (default setting linked to installation-type maybe?).

So my request isn't to make it possible, but for XY to do it automatically (when applicable).

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

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by admin »

I see, good idea. I put it on my list.

jupe
Posts: 3323
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by jupe »

If you wanted this feature in a hurry, theoretically it would be possible to script it to a CEA event, it should only be a few lines of code mainly using SC tab.

Garonne
Posts: 195
Joined: 21 Apr 2015 19:10
Location: Win11, 100% Scaling
Contact:

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by Garonne »

Nope. Not necessary. I've got two ways to handle the situation already, just needing to act manually for a minute or two. That's going to do for now.

I just thought it was a good thing if XY did it automatically, so I requested it.

I can handle the time till Don can go at it.

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

Re: Option to "save" the drive XY is stored on as <xydrive> or ?: in Tab Paths

Post by admin »

Turns out there is already a tweak for it. Did not test it, let me know if it still works:

Code: Select all

v12.40.0010 - 2013-05-08 10:50
    + Tweak PortableTabs enhanced: Now it's a bit field with the 
      following values:
        1 = store tabs portably
        2 = regardless of the app drive, else only if app path is on a 
            removable drive
        4 = relative to app drive, else relative to app path
      For example, set it to 7 to store tabs portably regardless of the 
      app drive and relative to the app drive:
        PortableTabs=7
      Note that PortableTabs=2 will not do anything anymore; it now has 
      to be 3 for the same functionality:
        PortableTabs=3
Search this file for the whole picture (earlier versions of PortableTabs):
https://www.xyplorer.com/download/History_1999-2019.txt

Post Reply