@echo off REM Archive.BAT REM Archive the files in source folder to same folder on target drive REM Last update 13 February 2008 REM by Seb Welford :archive REM vvvvvvvvvvvvvvvvvvvvvvvvv SOURCE folder - amend as necessary XCOPY "C:\Documents and Settings" "E:\Documents" /e /s /v /m REM ^^^^^^^^^^^^ TARGET folder - amend as necessary REM Notes: REM The drive letter depends on the target device, e.g. a USB memory stick where REM C: is the main drive and E: is the USB drive IF errorlevel 5 GOTO problem IF errorlevel 4 GOTO next IF errorlevel 2 GOTO stop IF errorlevel 1 GOTO nofiles IF errorlevel 0 GOTO finished REM Another disc to do ... :next echo. echo Drive %target full! echo. pause Insert an empty formatted disc to continue ... goto archive REM No files needed copying :nofiles echo. echo No files were copied. echo. goto exit REM No more files to do :finished echo. echo All files backed up. echo. pause goto exit REM Stopped by Control-C :stop echo. echo Copy aborted echo. pause goto exit REM Disc problem :problem echo. echo There was a problem writing to target disc echo. pause goto exit :exit echo Close this window using the X button (top right hand corner of window). exit