Remember file position and jump to deepest directory?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
andreasf
Posts: 16
Joined: 29 Nov 2017 12:37

Remember file position and jump to deepest directory?

Post by andreasf »

Hello,

I've got two quick questions, which I've tried to search for in settings but didn't find anything. Sorry if I missed it.

1) If you are navigating a directory, then jump out/close and start reopening from the lowest 'depth', XY remembers the last folder position(?). This allows you to tap enter and enter the last directory you were in. Is it possible to also remember file position?

2) If you have a directory like this X:/1/2/3/4 without any other folders/files, is it possible to jump to 4/ immediately after entering 1/ ?

Thank you.

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

Re: Remember file position and jump to deepest directory?

Post by highend »

1.
There is no equivalent pendant to
Configuration | General | Tree and List | List | Select last used subfolder
for files

2. If you haven't visited that folder yet, nope. Only doable via scripting.
If you've been in that folder and go back to something that is still in that path,
the breadcrumb bar shows ghosted entries that would still lead to that folder

E.g.:

Code: Select all

    $firstFolder = gettoken(listfolder(, , 2), 1, "|");
    if (exists(<curitem>) == 2) { $start = <curitem>; }
    elseif (exists($firstFolder) == 2) { $start = $firstFolder; }
    else { status "No folder to begin with found, aborted!", "8B4513", "stop"; end true; }

    $end = $start;
    while (true) {
        $start = gettoken(listfolder($start, , 2), 1, "|");
        if ($start) { $end = $start; }
        else { break; } // No subfolders exist, end
    }
    if ($end != $start) { goto $end; }
This would traverse all subfolders of the current selected folder of of the first folder in the current directory (e.g. if you have a file selected) and would bring you down into the deepest folder of it.... Even works if there are any files in any subfolders of it
One of my scripts helped you out? Please donate via Paypal

andreasf
Posts: 16
Joined: 29 Nov 2017 12:37

Re: Remember file position and jump to deepest directory?

Post by andreasf »

1. Ah, that's unfortunate. It would be extremely useful.

2. Perfect thank you!

Post Reply