User Commands - Relative Paths

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
Post Reply
phatmankerr
Posts: 186
Joined: 26 Dec 2005 19:35

User Commands - Relative Paths

Post by phatmankerr »

Just Tried out some of the user commands with relative paths - not sure if it's me, but got 'Move to' and 'Backup to' to work no probs with relative paths (they just appear to take the root that XY is installed to e.g. XY is installed to F:\Program Files\XYPlorer so they just pick up F:\ - which is the desired effect.

However using 'Open with' seems to pick up the XY Installation folder as well ? (F:\Program Files\XYPlorer\) whis is less desirable (infact it makes it impossible to select anything else above XY in the program files directory) :?

Cheers

Andy

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: User Commands - Relative Paths

Post by jacky »

hmm.. no I think you got that wrong, because there are two kind of "relative syntax" actually.

:arrow: When it comes to Move/Copy/Backup To it is the usual way you may know from console, DOS, HTML, etc ie. based on current location.
In such case, "..\Here" would mean a folder namd "Here" on the same level as the current one.

:arrow: But, when it comes to Go To and Open (With), the relative syntax is a portability feature actually! It allows you to specidy a path (of an application) based on, indeed, the application folder (location of the running XYplorer.exe), thus allowing you to reference applications without a fixed path.

So then, "..\Here" means a folder "Here" on the same level of the folder from where XY is running.

That way, it still works even when XY is on your USB stick for example, and you may not know what letter it'll be assigned on different computers, etc.

Another portability feature for the same purposes is to use the interrogation mark as drive letter, eg "?:\Data" This time the question mark will be replaced by the letter of the drive XY is running from, again allowing you to bypass the changing letters for USB devices, etc

This obviously only applies to Go To/Open (With) but not Move/Copy/Backup, as it's part of the portability. Those portability features are also supported on Catalog or XY's own File Associations.


So what you described is actually perfectly normal & expected behavior! Relative syntax on Move/Copy/Backup To is based on current location, but such a thing wouldn't really make sense for Open, the relative syntax there is a "different" relative syntax, for portability, based on the application folder.

Hope I was clear enough to explain this.
Proud XYplorer Fanatic

Post Reply