|
Answer» So I understand the very basics of batch files and that's about it. So I found this script online and was wondering if someone COULD help me make a few changes. I work for a SCHOOL DISTRICT and I'm always having to backup and restores users outlook, docs, pics, favorites etc. Each user that logins in is assigned a personal drive to backup STUFF drive P: Anyways that's a little background info.
--------------------------------------- This works perfect with XP right now but it would be nice if it would work with 7 also. Here's what I would like to do if possible...
Create a menu with 1,2, and 3.
Press a number and hit enter ...
1 - Backups up everything to drive P:\Backup 2 - Restores users data from P:\Backup to the local machine C:\users.. 3 - exit
Thanks in advance!
Code: [Select] @echo off :: variables set drive=P:\Backup - Auto set backupcmd=xcopy /s /c /d /e /h /i /r /y
echo ### Backing up My Documents... %backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents"
echo ### Backing up Favorites... %backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites"
echo ### Backing up email and contacts (MS Outlook)... %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook"
echo ### Backing up the Registry... if not exist "%drive%\Registry" mkdir "%drive%\Registry" if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg" regedit /e "%drive%\Registry\regbackup.reg"
:: use below syntax to backup other directories... :: %backupcmd% "...source directory..." "%drive%\...destination dir..."
echo Backup Complete! @pause
|