[net.micro.pc] .BAT Bug

joel@Rochester.ARPA@sri-unix.UUCP (10/09/83)

From:  Joel Seiferas <joel@Rochester.ARPA>

FOR seems to be another ("sub")command with bugs.  I tried to use a
batch file MULTI.BAT with a single command in it:

     for %%x in (%2 %3 %4 %5 %6 %7 %8 %9) do %1 %%x

On invocations like

     B>multi copy a:xxx a:yyy a:zzz ...

the FOR seems always to malfunction at column 51 of the command line.

Of course the particular application above could be handled more
generally if there were settable variables for batch files.  Is there
some easy way to use the environment for this?  Is there some way to
get at and change the values of the parameters %0,...,%9?

Another wish: a way to pass spaces within arguments to batch files.
(By the way, a simple modification to the source for CI C86's _main
makes this possible in that language--for example, it can be made to
respect double quotes when parsing command lines.)

Yet another wish: redirectable I/O for entire batch files.  Right now,
redirection fails, and the argument is not even passed into the batch.

                                Joel Seiferas
                                University of Rochester