ceez Posted March 30, 2006 Share Posted March 30, 2006 (edited) hello fellow msfn'ers,I am creating a script at work to backup the docs, favs, desktop, & outlook pst folder to their network user drive. I am using the xcopy command with an exclude file, yet the exclude.txt file is giving issues, it will not exclude files on my desktop but it DOES exclude the my documents. Below is a copy of my exclude.txt"%USERPROFILE%\My Documents\".wmv"%USERPROFILE%\My Documents\".wma"%USERPROFILE%\My Documents\".mp3"%USERPROFILE%\Desktop\".wmv"%USERPROFILE%\Desktop\".wma"%USERPROFILE%\Desktop\".mp3"%USERPROFILE%\Desktop\".lnkXCOPY "%USERPROFILE%\My Documents\*.*" "%homedrive%\%USERNAME%-BACKUP-%DATE:/=%\My Documents\" /e /y /c /exclude:c:\exclude.txtXCOPY "%USERPROFILE%\Desktop\*.*" "%homedrive%\%USERNAME%-BACKUP-%DATE:/=%\Desktop\" /e /y /c /exclude:c:\exclude.txtXCOPY "%USERPROFILE%\Favorites\*.*" "%homedrive%\%USERNAME%-BACKUP-%DATE:/=%\Favorites\" /e /yXCOPY "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook\*.*" "%homedrive%\%USERNAME%-BACKUP-%DATE:/=%/Outlook\" /e /yCan some script guru help me with this?Thanks,ceez Edited March 30, 2006 by ceez Link to comment Share on other sites More sharing options...
ceez Posted March 30, 2006 Author Share Posted March 30, 2006 Ok I figured out the problem.The exclude.txt file DOES NOT NEED ANY PATHS, just the file or folders that you want exluded, ie:.wma.wmv.mp3.lnkor if you want to exclude folders:\pics\\aim\\test\Issue resolved if anyone ever needs to exclude files with xcopy! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now