delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1999/01/20/00:00:48

From: "Calvin Richter" <calvin AT richter DOT org>
To: <opendos AT delorie DOT com>
Subject: Re: batch file help
Date: Tue, 19 Jan 1999 22:53:22 -0600
Message-ID: <01be4430$d0a44ca0$d10e53d1@default>
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Reply-To: opendos AT delorie DOT com

>Is there an easy way to tell if the HDD is already fdisked and formated
>with DR-dos so I can have the batch skip step 2 after rebooting when
>exiting fdisk?


The easiest way would be to use 4DOS -- its enhanced batch processing would
allow you to check for an empty drive.  Barring that, however, you would
have to set a flag. Put a file on your install disk called BOOT1, then put
something like the following in your AUTOEXEC:

IF EXIST BOOT2 GOTO SKIP_FDISK
REN BOOT1 BOOT2
[fdisk code goes here, which reboots]
:SKIP_FDISK
REN BOOT2 BOOT1
[rest of code goes here]

If BOOT2 doesn't exist, we're on the first boot -- set the flag and fdisk.

If BOOT2 does exist, we're on the second boot -- skip fdisk and reset the
flag.

Of course, remember to write-enable your boot disk.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019