Create alphabetical list of multiple folders and subfolders on separate drives

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
highend
Posts: 14923
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Create alphabetical list of multiple folders and subfolders on separate drives

Post by highend »

Use this top block:

Code: Select all

    $locs = "Q:\Movies|R:\Movies|Y:\Movies";
    $dirs = quicksearch(">[^\subs] /d", $locs);
    $dirs = formatlist(regexreplace($dirs, "^.:.+?\\"), "s", <crlf>);
    $dirs = regexreplace($dirs, "^.+\\", <space 2>);
One of my scripts helped you out? Please donate via Paypal

kiwichick
Posts: 673
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Create alphabetical list of multiple folders and subfolders on separate drives

Post by kiwichick »

highend wrote: 05 Apr 2026 01:52 Use this top block:

Code: Select all

    $locs = "Q:\Movies|R:\Movies|Y:\Movies";
    $dirs = quicksearch(">[^\subs] /d", $locs);
    $dirs = formatlist(regexreplace($dirs, "^.:.+?\\"), "s", <crlf>);
    $dirs = regexreplace($dirs, "^.+\\", <space 2>);
WOW!!! That is fan-freaking-tastic. Excatly what I was after. Thank you so very much :appl:
Windows 10 Pro 22H2

Native2904
Posts: 132
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: Create alphabetical list of multiple folders and subfolders on separate drives

Post by Native2904 »

I tried the script as well and have a question.

If multiple folders from the same path are to be processed, do you always have to specify the absolute path for each folder?

Code: Select all

 $locs = "Z:\Filme|Z:\Bruce Lee Collection|Z:\Bud Spencer_Terence Hill|Z:\Serien";
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

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

Re: Create alphabetical list of multiple folders and subfolders on separate drives

Post by highend »

Yes, why?
One of my scripts helped you out? Please donate via Paypal

Native2904
Posts: 132
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: Create alphabetical list of multiple folders and subfolders on separate drives

Post by Native2904 »

I was just wondering whether, once you specify the directory to look in, you can then use only relative paths—and if so, what separator should be used.
I just wanted to understand this for myself.
Thanks.
Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
Glückauf

Post Reply