Page 1 of 1

Script Request - Select pre-determined folders

Posted: 06 Jan 2011 16:47
by lem
Is there an easy way to do this? Let's say I have a folder c:\fruits\. In the fruits folder, there are an undetermined number of folders; c:\fruits\apples\, c:\fruits\oranges\, c:\fruits\pineapples\. With c:\fruits\ as my active tab, I want to be able to run a script that would multi-select certain pre-determined folders - say just c:\fruits\apples\ and c:\fruits\pineapples\. Thanks in advance for any suggestions.

Re: Script Request - Select pre-determined folders

Posted: 06 Jan 2011 16:55
by j_c_hallgren
lem wrote: With c:\fruits\ as my active tab, I want to be able to run a script that would multi-select certain pre-determined folders
Can you clarify how the desired folders are "pre-determined"? I'm not a scripter but I'm sure others would want to know more what you're trying to accomplish.

Re: Script Request - Select pre-determined folders

Posted: 06 Jan 2011 18:17
by lem
Thanks for your reply - I figured I wasn't explaining it very well...

By pre-determined, I mean I know the folders that I want selected ahead of time, and always want just those folders selected when I run the script. I assume this means I would hard-code in the script the specific folders I want selected and this is fine.

Re: Script Request - Select pre-determined folders

Posted: 06 Jan 2011 18:25
by zer0
Use the following SC (for your example)

Code: Select all

selectitems "apples|pineapples";

Re: Script Request - Select pre-determined folders

Posted: 06 Jan 2011 18:51
by lem
zer0 wrote:Use the following SC (for your example)

Code: Select all

selectitems "apples|pineapples";
Perfect - thank you!

Re: Script Request - Select pre-determined folders

Posted: 08 Jan 2011 09:06
by T-M
I'm brand new to XYPlorer and lem's question is one I had. But what I want to do is automate backing up the directories (per lem's example) once they're selected. As in, suppose I want to use the XYPlorer backup command to backup to my d: drive.

I assume it's possible (in a script? or is there a better way?) to select multiple directories and then backup to another drive?

Which is probably elementary but I'm just getting started with XYPlorer somehow I'm not finding it easy to figure out from the help file how to do this. Any help/suggestions would be appreciated.

Re: Script Request - Select pre-determined folders

Posted: 08 Jan 2011 11:47
by admin
T-M wrote:I'm brand new to XYPlorer and lem's question is one I had. But what I want to do is automate backing up the directories (per lem's example) once they're selected. As in, suppose I want to use the XYPlorer backup command to backup to my d: drive.

I assume it's possible (in a script? or is there a better way?) to select multiple directories and then backup to another drive?

Which is probably elementary but I'm just getting started with XYPlorer somehow I'm not finding it easy to figure out from the help file how to do this. Any help/suggestions would be appreciated.
Hi,

You don't even need to first select the items. Simply use a script line like this (will back up folders "E:\Test\a" and "E:\Test\b" to "D:\Backup\Test\<date yyyy-mm-dd>"):

Code: Select all

backupto "D:\Backup\Test\<date yyyy-mm-dd>", "E:\Test\a|E:\Test\b";
Note that the behavior of the backupto command can be configured by additional optional arguments. See Help file...

Don't hesitate to ask if you need further tips.

Don

Re: Script Request - Select pre-determined folders

Posted: 09 Jan 2011 19:43
by T-M
Thanks, that helped get me steered to the right places in the user guide. This is neat stuff, I can automate a bunch of things now. :D