Quote:
And why %i didn't work when %1 did work.

You probably have command extensions turned off somehow. Try opening a new CMD window using "cmd /e:on" and see if your batch file works with %i. The CMD options are sparsely documented here.