Virtual Folders in scripts?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Virtual Folders in scripts?

Post by klownboy »

I haven't been able to make a virtual folder in an XY script. I can from the hamburger menu with
vi:<get pick *.gif "G:\downloads"> //"Gifs Tools" but haven't been able to do it in a script. Certainly not a big deal. I was just wondering if it's possible in something like an XYplorer menu like,
"Pick gifs|:visualfilter" vi:<get pick *.gifs "G:\downloads">; I get an error, Dubious syntax: pick * The same error comes up if you use the script syntax in the hamburger menu starting with ::Pick Gifs...

Norn
Posts: 504
Joined: 24 Oct 2021 16:10

Re: Virtual Folders in scripts?

Post by Norn »

Code: Select all

tab("new", 'vi:<get pick *.gif "G:\downloads"> //"Gifs Tools"')
Windows 11 24H2 @100% 2560x1440

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Virtual Folders in scripts?

Post by klownboy »

Thanks Norn. So it appears that for the virtual folder syntax to work in a normal XY script it has to be part of the SC tab. Though I'm surely not positive on that. So, in standard old fashion XY script syntax, the following works:

Code: Select all

"Pick gifs|:visualfilter" tab("new", 'vi:<get pick *.gif "G:\downloads">')
Though as I stated above in the BC hamburger menu, this works:

Code: Select all

vi:<get pick *.gif "G:\downloads"> //"Gifs Tools"
Thanks again.

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

Re: Virtual Folders in scripts?

Post by admin »

That was just to show you how to quote it correctly. Of course you can use it with all location commands, e.g:

Code: Select all

goto 'vi:<get pick *.gif "G:\downloads"> //"Gifs Tools"';

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Virtual Folders in scripts?

Post by klownboy »

Ok, that's what I was after. Using SC goto, XY will use my default tab instead of creating a new one. Thanks.

In using the syntax you suggest, XY takes you to the specified folder, but it doesn't use the saved FVS for that folder. That I assume is that because virtual folders have their own built-in capability of saved folder views?

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

Re: Virtual Folders in scripts?

Post by admin »

You have to explicitly save a FVS for that virtual folder.

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Virtual Folders in scripts?

Post by klownboy »

Thanks Don. I had seen in the help that "· Folder View Settings are supported. ". I wasn't sure if it meant necessary if the specified folder had a saved FVS...I do now. :)

Post Reply