As I am new to scripting, I have tried to piece together a script file which checks
to see if the files on the server are newer and also if new files exist in the server directory.
They will be checked against my local directory.
If there are newer files dates and or new files in the server directory, I wish to copy the directory to my local drive.
Please Help
Thanks

to see if the files on the server are newer and also if new files exist in the server directory.
They will be checked against my local directory.
If there are newer files dates and or new files in the server directory, I wish to copy the directory to my local drive.
Please Help
Thanks
HTML Code:
Dim fs, objFolder, objFiles, objFile
Dim strMasterFilePath, objMasterFile, strTargetFilePath
Dim sf, objFolder, objFiles, objFile
'Update CATALOGES DIR
Set sf= CreateObject("Scripting.FileSystemObject")
Set fs= CreateObject("Scripting.FileSystemObject")
Set objFolder = fs.GetFolder("C:\Pricer\cataloges")
Set colFiles = objFolder.Files
For Each objFile in colFiles
strMasterFilePath = "G:cataloges\" & objFile.Name
Set objMasterFile = fs.GetFile(strMasterFilePath)
If objMasterFile.DateLastModified>objFile.DateLastModified Then
objMasterFile.Copy(objFile)
End If
strTargetFilePath = objFile
Set objMasterFile = Nothing
Next
Set colFiles = Nothing
Set objFile = Nothing
set objFolder = Nothing
Set fs = Nothing
Set fs = Nothing

