tags:

views:

61

answers:

1
A: 

Properly passing cmd-line args to vbs when using Cscript


-Modify the cmd-line statement as follows (drop the ">")

c:\test> cscript //nologo Test.vbs "c:\" "C:\test\Output.csv"

-Next inside the script you can access the cmd-line parameters as follows

strFolder = WScript.Arguments.Item(0)
strFile = WScript.Arguments.Item(1)

I hope now you can access the files and list them properly in the csv-file. :-)

GoodLUCK!!
- CVS

CVS-2600Hertz