BACKING UP YOUR FILES 

Where do you save files? 
bulletMy Documents
bulletFiles
bulletPhotos
bulletDownloads
bulletEmail Outlook Express

Consider moving them to  C:\

bulletC:\Docs
bulletC:\Photos
bulletMove My Documents and Outlook Express

Use the Windows Backup Utility

 

XCOPY - Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D]] [/P] [/S [/E]] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set, doesn't change the attribute.
/M Copies files with the archive attribute set, turns off the archive attribute.
/D:date Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and sub directories except empty ones.
/E Copies directories and sub directories, including empty ones. Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not include empty directories or sub directories. /T /E includes empty directories and sub directories.
/U Updates the files that already exist in destination.
/K Copies attributes. Normal xcopy will reset read-only attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.

 

EXAMPLES

Create c:\backup  

xcopy c:\Docs\*.* c:\backup /S

xcopy c:\Docs\*.* d:\Docs /C/I/S/M/D:10-22-2005

 

=========    MORE COMPLEX EXAMPLE  ===================== 
net use z: \\Compaq\c password deleted
setlocal
call last_7588_bud.cmd
@echo last back up was %bud%
pause
xcopy c:\1\*.* z:\1 /c/i/s/d:%bud%
xcopy c:\Docs\*.* z:\Docs /c/i/s/d:%bud%
xcopy c:\Files\*.* z:\Files /c/i/s/d:%bud%
xcopy c:\Bin\*.* z:\Bin /c/i/s/d:%bud%
xcopy c:\web\*.* z:\web_updates /c/i/s/d:%bud%
xcopy c:\"Documents and Settings"\a\favorites\*.* z:\windows\favorites /c/i/s/d:%bud%
echo set bud=%date:~4,2%-%date:~7,2%-%date:~10,4%>last_7588_bud.cmd
endlocal
pause
close
exit

 

 

EXAMPLE OF A BATCH FILE 

.
.
BACKUP OPTIONS
c = compaq 7588
d = dell4100
z = zip
a = archive
q = quit
s = re-start
Pick backup option:



:
@echo off
cls
:start
echo .
echo .
echo BACKUP OPTIONS
echo c = compaq 7588 
echo d = dell4100
echo z = zip
echo a = archive
echo q = quit
echo s = re-start
set /p choice="Pick backup option: " 
echo you choose %choice%
if "%choice%"=="c" goto compaq7588
if "%choice%"=="d" goto dell4100
if "%choice%"=="z" goto zipdrive
if "%choice%"=="a" goto archive
if "%choice%"=="q" goto end
@echo
@echo
!! NOT A VALID CHOICE - TRY AGAIN !!
@echo
goto start
pause
:
:compaq7588
@echo
echo you are at compaq7588
start /shared bak_to_compaq7588.bat
pause
goto start
:
:dell4100
@echo
echo you are at dell4100
start /shared bak_to_dell4100.bat
pause
goto start
:
:zipdrive
@echo
echo you are at zipdrive
start /shared bak_to_zipdrive.bat
echo you are back to ALL
pause
goto start
:
:archive
@echo
echo you are at archive
bak_to_archive.bat
start /shared 
pause
goto start
:
:end
end

LINK TO FILE

 

 

 


______________________________________________________________________

NOTE: Metroped is not qualified to provide legal advice. This web site contain non-vetted information that is un-official and for education only.  Technical information is for guidance and should be validated by a properly certified professional. There are no formal or financial agreements with any persons or entities cited.  Some material is from copyrighted sources  It is for education only and must be source referenced.  Metroped is privately funded and does not seek or accept financial contributions.

Metroped Inc.   P.O.  Box 7244   Alexandria, VA.   22307-0244  
Webmaster    Revised:  November 07, 2007
                                                                             Hit Counter