![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject [<<]Thread
Number : 4186 Date : 2003-04-01 Author : Garry Deane Subject : Re: Creating a batch file Size(KB) : 2
--- In xxcopy@yahoogroups.com, "bruceinmich" wrote: > In the instructions for XXCopy, it talks about creating > a batch file for a "D" drive, and I want to know how to > do it and if there is a standard batch file I can load to > back up my "C" any time I want without having to go > to all the work of reformatting the entire "D" drive ans > recopying the entire drive to "D". > I'm running Windows 98 on my "C" drive and all I want > to do is back it up on a periodical basis. I'm just a > beginner, so this question may seem really dumb, > but it would help if anyone could explain the procedure > to me. Thanks in advance, Bruce The reference to a batch file for the D: drive relates to backing up more than one drive. Since Xxcopy can only accept one source root directory (e.g. C:\), if you want to backup both C:\ and D:\ to say N:\, you need to issue 2 Xxcopy commands - 1 for each drive. You would create a batch file (a plain text file with a .bat extension) and put the Xxcopy commands there. Something like: @echo off Xxcopy C:\ N:\ /clone/pz0 Xxcopy D:\ N:\ /clone/pz0 From your previous posts, it doesn't seem like this is applicable to you. You apparently have W98 and all your working files on C:\ and a copy of that on D:\. There is certainly no need to reformat the drive now that it is set up as a bootable drive. To backup your C:\ to D:\ you would simply use: Xxcopy C:\ D:\ /clone/pz0 If you want to create a batch file to do this, open Notepad or similar and create a text file called say C:\\CLONE.BAT where is the name of the directory where Xxcopy resides. Then paste the following into the file. @echo off Xxcopy C:\ D:\ /clone/pz0/onC:\CLONE.LOG if not errorlevel 1 goto :eof if errorlevel 100 if not errorlevel 101 goto :eof echo An error occurred backing up the C:\ drive echo Opening C:\clone.log for review start notepad c:\clone.log pause :eof :: Use this next line if you want to run the batch from a shortcut :: and you want the window to close after if has finished. Delete :: it if you want to see the Xxcopy output after it has finished. cls You can execute this batch file by opening a DOS Prompt window and typing 'clone' or you can create a shortcut on your desktop to the batch file and double click that to run the backup operation. You might want to adjust the error tests and final 'cls' until you get the hang of what is happening. This particular batch file will close the DOS window when run from a shortcut if there is no error. If there is an error, it will open the log file so that you can review what happened. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.