hoshie329
asked on
VBScript File Copy and Rename
I am working on a script to copy and rename a file, i am getting an error on the last line.. mismatch..'FileCopy', I am not sure what i have wrong
Dim Location
Dim BackupLocation
Dim FileName
Dim BacupFileName
DIM strComputer
DIM PCName
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_ComputerSystem",,48)<wbr ></wbr>
For Each objItem In colItems
PCName = objItem.Name
Next
Location = "C:\Program Files\ProgramFolder\SubFolder\SubSubFolder"
BackupLocation = "y:\SOuser"
FileName="users.xml"
BacupFileName = PCName & ".xml"
FileCopy Location & "\" & FileName, BackupLocation & "\" & BacupFileName
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Great, glad that's all it was. thanks for the feedback.
~bp
~bp
ASKER