I recall that this was at least originally only allowed in batch files, and the reason for that IIRC is that a single `%` could be taken as the specifier for an environment variable. (Early versions of `COMMAND.COM`, the real-mode command processor, don't expand environment variable references on the command line.) I don't know if that's true of the current version of `CMD.EXE` on Windows.