We've reached the edges of my knowledge of MS DOS batch file syntax and semantics.

I suspect this means at least Windows NT DOS is required for the magical syntax at the end to work.