Quote:
okay. I still don't understand why it has to be one character. And why %i didn't work when %1 did work.

The %% is important. %%i and %%1 should both work. %i or %1 won't in a batch file.

As for single character variable names:

Code:

C:\>help for
Runs a specified command for each file in a set of files.

FOR %variable IN (set) DO command [command-parameters]

%variable Specifies a single letter replaceable parameter.
(set) Specifies a set of one or more files. Wildcards may be used.
command Specifies the command to carry out for each file.
command-parameters
Specifies parameters or switches for the specified command.

To use the FOR command in a batch program, specify %%variable instead
of %variable. Variable names are case sensitive, so %i is different
from %I.
<CHOP>