swansonager – what is matt up to?

life of matt: husband, dad, cto, photographer, landlord, mountain biker

Posts filed under ‘data backup’

Simple backup script for Windows XP and other Windows Systems

August 17, 2009

ARE YOU BACKING UP YOUR DATA?

Have you ever wanted to automate a backup to a network share? If so, here’s an easy script to do just that. Copy the cope below and save it as backup.bat to your c:\ – then run the file so it copies from %1 to %2 – you can call it like this cmd -> backup.bat c:\ \\your-network-share – that would copy all the files to a network share from your C:\ drive. You can use a mounted USB drive as well as the destination drive if you want…. Personally, I use the switch “/E /D /R /H /C /Y /I” since I only want newer files and want to suppress the prompts to create new directories, etc. enjoy!

@echo off
rem COPYIT.BAT transfers all files in all subdirectories of
rem the source drive or directory (%1) to the destination rem drive or directory (%2)

xcopy %1 %2 /E /D /R /H /C /Y /I

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 0 goto exit

:lowmemory
echo Insufficient memory to copy files or
echo invalid drive or command-line syntax.
goto exit

:abort
echo You pressed CTRL+C to end the copy operation.
goto exit

:exit

1 Comment

Download Full Movie Online Young Frankenstein download movie Young Doctors in Love download movie Double Jeopardy download movie Double Agent download movie You, Me and Dupree download movie Deathline download movie Conspiracy download movie Carlito's Angels download movie The Young Black Stallion download movie Nobody s fool download movie The octagon download movie Flags of our fathers download movie Red dawn download movie The charge of the light brigade download movie Ballast download movie Cedar boys download movie