I have a script that copies a users favorites to the server when they logout and copies down from the server in the login script locally. Its working as it should however I can not figure out have to overwrite the directory as both scripts seem to append the contents rather than overwrite it.
sample from the log in script:
strUser = WSHNetwork.UserName
strStatus = strStatus & vbCRLF & vbCRLF & "Copying Favorites from U drive...."
ie.document.all.wstatus.InnerText = strStatus
ndomain = ".mydomain"
ufav = "u:\Favorites"
Set objFSO = CreateObject("Scripting.FilesystemObject")
strfavPath = "C:\Documents and Settings\" & struser & "\Favorites"
If objFSO.FolderExists(strfavPath) = False Then
strfavPath = "C:\Documents and Settings\" & struser & ndomain & "\Favorites"
if objFSO.FolderExists(ufav) = true Then
objFSO.CopyFolder "u:\Favorites", strfavPath, "true"
Set objFSO = Nothing