alanterrill
IS-IT--Management
I want to automate the backup of users Outlook data which is at present held on their c drives. I want to move it to the server each night when they close down so it gets backed up. Logoff scripts seem a good idea, but I've never written a script before.
What I want to say is something like:
xcopy c:\documents and settings\local settings\application data\microsoft\outlook\outlook.pst p:\outlook
However, how do I substitute the name of each user for username? Is it %username%?
I've tried running the above just as a batch file on my PC and it says "Invalid number of parameters". I'm assuming as a dos utility it can't handle "documents and settings" -is there a better command that will handle long file names, or does the error message indicate something else?
What I want to say is something like:
xcopy c:\documents and settings\local settings\application data\microsoft\outlook\outlook.pst p:\outlook
However, how do I substitute the name of each user for username? Is it %username%?
I've tried running the above just as a batch file on my PC and it says "Invalid number of parameters". I'm assuming as a dos utility it can't handle "documents and settings" -is there a better command that will handle long file names, or does the error message indicate something else?