blank.gif (43 bytes)

Church Of The
Swimming Elephant

Search:
index.gif

ntcmds00000000.gif

Backup--Examples

Suppose you want to back up all the files in the \PUBLIC\SMITH directory on drive C onto a blank, formatted disk in drive A. To do so, type the following:

backup c:\public\smith\*.* a:

Suppose you need to back up all files in the \PUBLIC\SMITH directory on drive C onto a 720K floppy disk in drive B. If the floppy disk is unformatted, backup formats it before backing up any files. Because the /s switch is not specified in the following command, files in subdirectories are not backed up:

backup c:\public\smith\*.* b: /f:720k

To write a simple batch program named SMITH that supports the backup command's exit codes and the /s switch, create a file containing the following commands using any editor.

echo off

rem Smith's backup command

backup c:\public\smith\*.* b: /s

if errorlevel 4 goto error

if errorlevel 3 goto abort

if errorlevel 2 goto conflict

if errorlevel 1 goto no_files

if errorlevel 0 goto success

:error

echo Backup stopped the process due to an error

goto exit

:abort

echo You just pressed CTRL+C to stop the backup

goto exit

:conflict

echo One or more files were not backed up due to a sharing conflict

goto exit

:no_files

echo Sorry, but there were no files to backup

goto exit

:success

echo The backup was successful

goto exit

:exit

For more information about using the if command in batch programs, see the if command.

More Information About Backup

ntcmds00000001.gif Backup--Notes

ntcmds00000001.gif Backup

Cotse.Net

Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

 
.
www.cotse.com
Have you gone to church today?
.
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 Cotse.com.
Cotse.com is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609