Posted to vbscript by patthoyts at Fri Aug 25 13:10:26 GMT 2006view pretty
<?xml version='1.0'?> <package> <job id="CopyDemo"> <runtime> <description>Demo copying files</description> <unnamed name="files" many="true" required="true" helpstring="List of files to copy"/> </runtime> <script language="VBScript"> <![CDATA[ ' This file can be run using 'cscript CopyDemo.wsf filename1 filename2 ...' ' Or you can drop some files onto the script in explorer and get message boxes. ' Option Explicit Dim oFSO, vFile, sMsg Set oFSo = CreateObject("Scripting.FileSystemObject") For Each vFile In WScript.Arguments.Unnamed sMsg = CStr(vFile) If oFSO.FileExists(sMsg) Then sMsg = sMsg + " exists" Else sMsg = sMsg + " does not exist" End If WScript.Echo sMsg Next ]]> </script> </job> </package>