| Posted: 02 May 2008 at 5:51pm | IP Logged
|
|
|
Here is how you can exclude files while using the XCOPY command
xcopy "C:%homepath%\Desktop\*.*" "\\Server\Users\%username%\Local_Backup\Desktop\" /e /h /r /y xcopy "C:%homepath%\Local Settings\Application Data\Microsoft\Outlook\Microsoft\Outlook\*.*" "\\Server\Users\%username%\Local_Backup\Email\" /e /h /r /y
rem Adding the folders to exclude from the backup echo %userprofile%\My Documents\My Music\ >> c:\excludefile.txt echo %userprofile%\My Documents\My Pictures\ >> c:\excludefile.txt echo %userprofile%\My Documents\My Videos\ >> c:\excludefile.txt
rem Running the XCopy to backup the diretory xcopy /EXCLUDE:c:\excludefile.txt "%userprofile%\My Documents\*.*" "\\Server\Users\%username%\Local_Backup\My Documents\" /e /h /r /y
rem Clean Up - Delete the new excludefile.txt del c:\excludefile.txt
|