How to display list of folders in a pane?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

How to display list of folders in a pane?

Post by Papoulka »

Scripting - I have created a string made up of folder names eg.
  • $folist = "C:\temp\folder1|C:\temp\folder2|C:\temp\folder3|"
At the end of my script, I would like to display these folders in a list pane - just as if they had been found by a File Find manual search. I think XY can do this, but none of the scripting commands seem suited to it.

Thanks for any help

Stef123

Re: How to display list of folders in a pane?

Post by Stef123 »

I don't know how to script it in detail, but couldn't you write that list into a paperfolder, then display it?

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: How to display list of folders in a pane?

Post by bdeshi »

you can also generate a saved search INI, then load that using sc loadsearch(). Just as if they had been found by a File Find manual search.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: How to display list of folders in a pane?

Post by highend »

Code: Select all

    $folist = "C:\temp\folder1|C:\temp\folder2|C:\temp\folder3|";
    paperfolder("Temp", $folist, "|");
Easiest and fastest way is the paperfolder...
One of my scripts helped you out? Please donate via Paypal

Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Re: How to display list of folders in a pane?

Post by Papoulka »

Thanks stef123 & highend; paperfolder does what I need and I'll be using it. Plus I've learned something about PFs.

Sammay, I was originally hoping to get my compiled string into a true search results window. However, I don't see any way to create a search template from that string, especially not within a script. It looks like PFs are the best choice and I'm glad they get me so close to what I wanted.

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

Re: How to display list of folders in a pane?

Post by highend »

However, I don't see any way to create a search template from that string
Why not? Save a search as a template. Use the content of it in a heredoc variable, replace the necessary item(s) with your $folist variable, save that template, load it...
One of my scripts helped you out? Please donate via Paypal

Post Reply