Show '..' (parent) in folder

Features wanted...
admin
Site Admin
Posts: 60599
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

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

Post 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.

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

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

Post 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
2022-05-05_125447.png (10.14 KiB) Viewed 1889 times
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
2022-05-05_125501.png (4.77 KiB) Viewed 1889 times

raraz
Posts: 16
Joined: 28 Apr 2022 13:07

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

Post 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.

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

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

Post by admin »

You need v23.00.0207 or later.

omid
Posts: 20
Joined: 15 Mar 2018 17:00

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

Post 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("..")
Last edited by omid on 05 May 2022 17:20, edited 1 time in total.

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

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

Post by admin »

No, resolvepath("..") has not and will not be changed. So there is no need for <xyparent>. Right?

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

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

Post 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>");
One of my scripts helped you out? Please donate via Paypal

omid
Posts: 20
Joined: 15 Mar 2018 17:00

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

Post 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.

omid
Posts: 20
Joined: 15 Mar 2018 17:00

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

Post 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:

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

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

Post 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)....
One of my scripts helped you out? Please donate via Paypal

WirlyWirly
Posts: 195
Joined: 21 Oct 2020 23:33
Location: Through the Looking-Glass

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

Post 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.

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

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

Post 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>. :)

omid
Posts: 20
Joined: 15 Mar 2018 17:00

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

Post by omid »

Thank you for adding <xyparent> :biggrin:

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

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

Post by jupe »

ssx wrote: 04 May 2022 11:59(with my mouse).
2022-05-07_104729.png
2022-05-07_104729.png (5.04 KiB) Viewed 1674 times

Post Reply