09 February 2009

VBSCRIPT For a Copy a Folder

For a Copy a Folder

Dim wShell
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
'errReturn = objWMIService.Create _
' ("cmd.exe /c md c:\ups", Null, Null, intProcessID)
Set objFSO = CreateObject("Scripting.FileSystemObject")

objFSO.CopyFolder "file://172.20.128.51/sms_uk/Oct 2008\*.*" , "c:\pav\" , OverwriteExisting

Set wShell = CreateObject("WScript.Shell")
'wShell.Run "c:\ups\Election.html"
Const OverwriteExisting = TRUE


No comments: