Page 1 of 1

Using the ListOfSelectedNames argument with a script

Posted: 03 Nov 2006, 23:54
by wintermute
I am trying to take advantage of the User Menu feature of SS(2.5 RC1). I want to send a list of selected files and the current path to a script I have written. I have created a User Menu item that calls the script and for arguments I have the drive and path and $(ListOfSelectedNames)

The list of selected names is sent with spaces between the filenames. ie. TestOne.asp TestTwo.asp. What I would like to do is be able to send a list of the filenames with some sort of seperator such as a semicolon. This would save me from having to change some existing scripts and having to do extra parsing the arguments within the script. Here is how I would like to call the script.

Cscript C:\Batch\ArchiveResource.vbs TestOne.asp; TestTwo.asp D:\wwwroot\files

Instead of

Cscript C:\Batch\ArchiveResource.vbs TestOne.asp TestTwo.asp D:\wwwroot\files

which does not have a semicolon seperator.

Can anyone offer any ideas.

Thanks,
Blake

Posted: 04 Nov 2006, 12:40
by SvA
In a BAT or CMD script you get the arguments propperly seperated using %1 %2...
In a WSH script you should get the same using WScript.Arguments