Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy script not working

Status
Not open for further replies.

john1944

Technical User
Aug 27, 2008
3
GB
Hello All,

I have done a script to create and then copy from network share, it also copies two files to the windows dir and one Icon to profile.
The problem is that the script works when I run it from pc but not when I create a Logonscript in AD with GPO. I get all sorts of funnies, like path not found, end of statement. What do I need to do to make it work?
Thanks
John1944

'DEFINE VARIABLES & INITIAL POINTERS


sSourceFile = "h:\rips2006\*.*"
sSourceFile1 = "c:\rips2006\ans.i*"
sSourceFile2 = "c:\rips2006\sql.i*"
sSourceFile3 = "c:\rips2006\rips 2006.l*"
sDestinationFile = "c:\RIPS2006"
sDestinationFile1 = "c:\windows"
sDestinationFile2 = "C:\Documents and Settings\All Users\Desktop"


Set oFSO = CreateObject("Scripting.FileSystemObject")



'CHECK DESTINATION ROOT EXISTS AND IF NOT CREATE IT

if NOT oFSO.FolderExists(sDestinationFile) THEN
oFSO.CreateFolder(sDestinationFile)
'COPY FILES

oFSO.CopyFile sSourceFile, sDestinationFile
oFSO.CopyFile sSourceFile1, sDestinationFile1
oFSO.CopyFile sSourceFile2, sDestinationFile1
oFSO.CopyFile sSourceFile3, sDestinationFile2

End If


'CLOSE OFF OBJECTS

Set oFSO = NOTHING


 
I suspect the H: drive not yet mapped

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yip, thats it. Moved the script down the order and by the time it runs, everything is mapped
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top