[comp.sys.amiga] Help! batch file problems

arxt@sphinx.uchicago.edu (patrick palmer) (06/08/88)

I just ran into a stupid problem that I do not understand.  I was trying to
simplify the job of formating a whole pile of disks (to see if they are OK).
I tried to create a batch file (which might or might not be easier - but when
something is as boring as formating 50 disks, why not).  I made a file in the 
s: directory that looked like:

echo "begin"
format drive df0: name blank noicons
echo "finish"

Then from the system: directory, I typed:
execute filename

It appeared to work fine until the bitter end; then it failed with some 
message like:
returncode 20
(maybe it said format failed first).

Anyway, I do not have any documentation to tell me what this returncode means,
and I do not see anything wrong with what I did.  Would someone please 
enlighten me.  (I have a plain vanilla system on an A1000 and
a B2000 - both give the same result.)

Pat Palmer    arxt@sphinx.uchicago.edu  (Bitnet or arpanet)
              7.20::oddjob::ppalmer    (span)

jdp@killer.UUCP (Jim Pritchett) (06/11/88)

In article <4349@sphinx.uchicago.edu>, arxt@sphinx.uchicago.edu (patrick  palmer) writes:
> 
> I just ran into a stupid problem that I do not understand.  I was trying to
> simplify the job of formating a whole pile of disks (to see if they are OK).
> I tried to create a batch file (which might or might not be easier - but when
> 

     [ stuff deleted...]

> It appeared to work fine until the bitter end; then it failed with some 
> message like:
> returncode 20

     [ more stuff deleted...]

> 
> Pat Palmer    arxt@sphinx.uchicago.edu  (Bitnet or arpanet)
>               7.20::oddjob::ppalmer    (span)


     This is an old problem.  For some reason, format returns error code 20
whenever it is run (even successfully) from a batch file.  One workaround is
to put a "failat 20" command before the format command and a "failat 10" (??)
after the format to restore the normal condition.  I dont know what format
will return if it really fails.  I ran into this bug a year or two ago while
trying something similar to what you are doing.

     Hey CATS!  Has this bug been fixed in 1.3?  (I wonder if the ARP guys
fixed it???)



                                I hope that this helps,

                                                         Jim Pritchett



P.S.  Does anyone know of a free (or cheap) access to the net in the Fort Worth
Texas area?  I am using killer in Dallas now, but I am moving to Fort Worth
soon.  (The toll fees can get very expensive with the current comp.*.amiga.*
volume!)

Arved@cup.portal.com (06/15/88)

     In 1067.3.5080.2, jdp@killer.UUCP asks if problems with the FORMAT
command have been fixed in 1.3 or by the ARP command.

     I do not have 1.3, but do use ARP, and came across the Format Failed
return code 20 problem.  The FORMAT command was not included in a batch
file, it was just plain executed in the CLI.  The command was:

                    FORMAT drive df0: name "Communications Programs"

     Everything worked as expected if I used a single word for the disk
name without quotes (as in . . . name NewFloppy).

/* Standard disclaimers apply */          //
Arved@cup.portal.com                    \X/