Page 1 of 1

Option for Path Relative to Current Location

Posted: 31 Jan 2009 17:45
by scrotty
I know that the way relative paths in XYplorer work is to be relative to the XYplorer executable.

Would is be possible/reasonable to optionally prepend the relative path with a sequence to indicate the "relativeness" should be to the current path?

For example, if I use the "Go to" dialog and enter ".." (without quotes) I go to XYplorer's parent folder which, for me, brings me to C:\Program Files.

What I'd like to be able to do is enter, perhaps, "./.." (without quotes) in the Go To dialog to mean, "Go up one directory from the directory I'm currently in." The "./" being standard in command shells for current working directory.

Thanks!
Sean

Re: Option for Path Relative to Current Location

Posted: 31 Jan 2009 20:51
by admin
scrotty wrote:I know that the way relative paths in XYplorer work is to be relative to the XYplorer executable.

Would is be possible/reasonable to optionally prepend the relative path with a sequence to indicate the "relativeness" should be to the current path?
Possible yes, but reasonable? I'm not sure what you want to achieve by this. But wait...

... OTOH, I'm not totally convinced that the current way is the best way. Frankly, if I entered a relative path (which I never do; just not the way I work) into the address bar I would expect it to be relative to the current path! So, maybe it would be quite reasonable to make your suggestion the default behavior! Just checked WE, and it also does it.

Re: Option for Path Relative to Current Location

Posted: 31 Jan 2009 21:13
by scrotty
admin wrote: ... OTOH, I'm not totally convinced that the current way is the best way. Frankly, if I entered a relative path (which I never do; just not the way I work) into the address bar I would expect it to be relative to the current path.
I originally had exactly this statement in my first post but took it out because I figured there must have been a really important reason for why it was this way in the first place. :)

As far as why I'd want to do this:

1) I've become very accustomed to using Ctrl-G to bring up Goto. I like the idea of navigating from that dialog rather than using Ctrl-<up> or Alt-<left> or whatever the keys are.
2) I'm probably somewhat slanted to this desire from my years of use in unix shells. I admit this may not be something most XYplorer users are familiar with. And I realize you are not planning on implementing a full-blown XYshell until v8. :wink:

Re: Option for Path Relative to Current Location

Posted: 31 Jan 2009 22:00
by Pagat
i also would like the ability to use GoTo relative to the current path. I even tried to mimic it in my QuickGoTo script but i never really found the time to implement it.

Re: Option for Path Relative to Current Location

Posted: 01 Feb 2009 08:31
by admin
Okay, I'm all for it. However, it would break scripting command goto which also works relative to app path. BTW, the whole relative to app path thing is part of the portability thing (sorry for the stupid wording, first coffee, early morning... :wink: ).

jacky, as our leading scriptor, what's your opinion? Should goto as well work relative to the current path???

Re: Option for Path Relative to Current Location

Posted: 01 Feb 2009 10:34
by PeterH
I'd also say that for the current location the relative path is logical.

And in scripting xypath and xydata can be used.

Re: Option for Path Relative to Current Location

Posted: 01 Feb 2009 12:18
by jacky
Yeah I've been thinking about this, and I myself have been wishing that Go To would support relative paths to the current folder, indeed.

I think it makes sense to work that way, and is probably more logical for goto to relate to current location than <xypath>, so while it might break a few scripts/UDC/Catalog items/etc it's probably a good thing. Besides, it's not like it would be the only exception, Move/Copy/Backup To already work that way, because it makes more sense then to relate to current path, and there's XY variables otherwise. I think same goes for goto, so let's have it relate to current path I say.

Plus, what's easier to read: goto ".."; or #523; ;)

Re: Option for Path Relative to Current Location

Posted: 01 Feb 2009 12:37
by PeterH
jacky wrote:Plus, what's easier to read: goto ".."; or #523; ;)
Sorry: I cannot read #523; - and will not learn it :evil: :mrgreen:

Re: Option for Path Relative to Current Location

Posted: 01 Feb 2009 13:25
by admin
Ok, will try after 0100 is published.

Re: Option for Path Relative to Current Location

Posted: 20 Feb 2009 20:31
by admin
admin wrote:Ok, will try after 0100 is published.
Done. Next version has it.

Re: Option for Path Relative to Current Location

Posted: 21 Feb 2009 12:19
by Pagat
hooray! thx for that.

Re: Option for Path Relative to Current Location

Posted: 24 Feb 2009 10:34
by sweety
Hello,
how do i get now an portable shortcut when i cant use the indirect Path from xyplorer.exe (without scripting just for normal user) Does an variable like %windir% (should be %xydir%) pointing to drive on which xyplorer is running from?

Or is this Portable function deleted with no alternate?


ps.:scrotty: thanks for the tip with ctrl+G its now one of my most used feature. Searching, highlight and filtering... i love this way to do this :D

Re: Option for Path Relative to Current Location

Posted: 24 Feb 2009 16:24
by Pagat
sweety wrote:how do i get now an portable shortcut when i cant use the indirect Path from xyplorer.exe (without scripting just for normal user)
I already answered in the other thread: http://www.xyplorer.com/xyfc/viewtopic.php?f=2&t=3434

Here again:

- - -
or use the '?' for the USB drive letter where XY is running from. E.g.:

Code: Select all

?:\Dokumente\bla.doc
- - -