@echo off rem rem this script will backup the user's files to a Flash drive rem echo. echo This backup procedure will backup your "My Documents" folder, and echo all of your other files in echo. echo %USERPROFILE% echo. echo (this includes settings and email files) to an external drive (like echo a "flash drive" or "usb drive"). Note that you can run this backup echo several times, and it will only copy newer files that have been echo changed, skipping files that haven't changed. (If you delete echo a file from your computer, it won't delete the backup file, but if echo change a file on your computer, the new version overwrites the echo backup version.) echo. set drivetmp=H set /p drivetmp="What is the drive letter to backup to (default: %drivetmp%)? " echo. echo backing up from "%USERPROFILE%" to "%drivetmp%:\%USERNAME%_Backup" echo Please wait until backup is completed. rem pause robocopy "%USERPROFILE%" "%drivetmp%:\%USERNAME%_Backup" /copy:datos /e /r:0 /xj /xd cache* /xd temp* /xd tmp* /xd dmrccache* echo. echo Backup completed. pause exit rem the robocopy /copyall doesn't work if transferring from NTFS to FAT32 rem the above /xd commands are case-insensitive, and exclude all subdirectories that begin rem with the following character pattern. In particular, we are excluding subdirectories rem like C:\...\Mozilla\...\Cache*, because they change names frequenly, and the old rem cached files will build up relatively quickly until the backup drive fills up.