Question : Logoff script not backing up files correctly

I'm having some trouble with my log off script. It doesn't seem to be working for some people. I think it might be a permissions issue. The script is set in AD to run at logoff. It copies all the .pst's and mydoc files up to a shared folder. The format is \\server\folder\username\profile\*.* but the folder is not created for the newer users automatically.
 
here is and example of the code I'm using...

xcopy "%userprofile%.%userdomain%\Local Settings\Application Data\Microsoft\Outlook\*.pst" "\\server\profiles\%username%\outlook\" /E /H /C /D /Y /EXCLUDE:junk.txt

I'm sure I'm missing something easy here but I'm not sure what it is! Thanks!

Answer : Logoff script not backing up files correctly

You may want to echo Y into xcopy. When the destination folder doesn't exist, xcopy sometimes can't figure out that it is a directory rather than a file.

echo Y|xcopy "%userprofile%.%userdomain%\Local Settings\Application Data\Microsoft\Outlook\*.pst" "\\server\profiles\%username%\outlook\" /E /H /C /D /Y /EXCLUDE:junk.txt
Random Solutions  
 
programming4us programming4us