Page 1 of 1
Virtual Folders in scripts?
Posted: 23 Aug 2023 18:42
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...
Re: Virtual Folders in scripts?
Posted: 23 Aug 2023 21:06
by Norn
Code: Select all
tab("new", 'vi:<get pick *.gif "G:\downloads"> //"Gifs Tools"')
Re: Virtual Folders in scripts?
Posted: 23 Aug 2023 22:06
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.
Re: Virtual Folders in scripts?
Posted: 24 Aug 2023 09:26
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"';
Re: Virtual Folders in scripts?
Posted: 24 Aug 2023 12:03
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?
Re: Virtual Folders in scripts?
Posted: 24 Aug 2023 12:07
by admin
You have to explicitly save a FVS for that virtual folder.
Re: Virtual Folders in scripts?
Posted: 24 Aug 2023 15:02
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.
