Page 2 of 2

Re: Show '..' (parent) in folder

Posted: 05 May 2022 12:53
by admin
RSI: yep, been there from too much hi-hat action on the drums. I couldn't hold a beer bottle for 6 months with my right hand.

Re: Show '..' (parent) in folder

Posted: 05 May 2022 12:56
by admin
ssx wrote: 05 May 2022 11:29 This sounds good. I have no clue how it will work then, but i will see.
Many thanks for your commitment.
I think it was a good idea to switch from SpeedCommander. The XY offers so much more and i like the community.
You just add an item to the Catalog and put .. in to the Location field.
2022-05-05_125447.png
Then you have this thing to click on for "go up" (and you don't even have to scroll up the list):
2022-05-05_125501.png

Re: Show '..' (parent) in folder

Posted: 05 May 2022 13:53
by raraz
Hi,
Not sure if its me but
"tweak ABRelativeToAppPath is set to 1." doesnt seem to work. Both 0 or 1 go to application path.
I did restart the app.

Re: Show '..' (parent) in folder

Posted: 05 May 2022 13:59
by admin
You need v23.00.0207 or later.

Re: Show '..' (parent) in folder

Posted: 05 May 2022 17:18
by omid
admin wrote: 05 May 2022 10:40 Additionally from the next beta onwards you can use .. as location in a Catalog item to go upwards from here:

Code: Select all

    * Catalog: A location ".." was by default resolved relative to app path. Nobody needs 
      this. Now it is resolved relative to the current path.
      Exception: tweak ABRelativeToAppPath is set to 1.

Hi Don
Are you planning to change the behavior of this function as well?
resolvepath("..")

I use it a lot to find the parent folder of XYPlorer because of my folders structure.
.../portable/
.../portable/xyplorer
.../portable/mpv
.../portable/others

For example, in CFA:

Code: Select all

|"MVP|MPV.ico" {:Video}>::run resolvepath("..")."\MPV\mpv.exe --config-dir=".resolvepath("..")."\MPV\mvp ""<curitem>""" ;
Can you please add a native variable like <xyparent> equal to resolvepath("..")

Re: Show '..' (parent) in folder

Posted: 05 May 2022 17:23
by admin
No, resolvepath("..") has not and will not be changed. So there is no need for <xyparent>. Right?

Re: Show '..' (parent) in folder

Posted: 05 May 2022 17:30
by highend
A bit shorter and easier to read...

Code: Select all

|"MVP|MPV.ico" {:Video}>::$p = resolvepath(".."); run lax("$p\MPV\mpv.exe" --config-dir="$p\MPV\mvp" "<curitem>");

Re: Show '..' (parent) in folder

Posted: 05 May 2022 17:34
by omid
admin wrote: 05 May 2022 17:23 No, resolvepath("..") has not and will not be changed. So there is no need for <xyparent>. Right?
It would be helpful if there was a <xyparent>, because it makes the code shorter and more understandable.

Re: Show '..' (parent) in folder

Posted: 05 May 2022 17:36
by omid
highend wrote: 05 May 2022 17:30 A bit shorter and easier to read...

Code: Select all

|"MVP|MPV.ico" {:Video}>::$p = resolvepath(".."); run lax("$p\MPV\mpv.exe" --config-dir="$p\MPV\mvp" "<curitem>");
Thank you highend, as always, I learn a lot from your codes :appl:

Re: Show '..' (parent) in folder

Posted: 05 May 2022 19:49
by highend
If think <xyparent> makes total sense. Especially for all the people that store XY in a portable folder (and belonging tools one level above)....

Re: Show '..' (parent) in folder

Posted: 06 May 2022 02:26
by WirlyWirly
I use
<xypath>..\..\
when accessing the parent folder where I keep XY. It works fine, but if I could make it more readable with <xyparent> then I'm all for it.

One of the selling points on the XY homepage is portability, so having such a variable would be beneficial for the users who use relative paths in order to maintain that portability.

You can never have enough environment variables. Useful for people who need them and unobtrusive for those that don't. Win-win.

Re: Show '..' (parent) in folder

Posted: 06 May 2022 08:51
by admin
You should use <xypath>\.. to go to the parent folder. Your pattern leads to an invalid path that leads to the right goal only through grace. :)

I'll add <xyparent>. :)

Re: Show '..' (parent) in folder

Posted: 06 May 2022 13:08
by omid
Thank you for adding <xyparent> :biggrin:

Re: Show '..' (parent) in folder

Posted: 07 May 2022 03:07
by jupe
ssx wrote: 04 May 2022 11:59(with my mouse).
2022-05-07_104729.png