WAD rem does not work correctly

The manual says:
REM must be followed by a space or tab character, then the comment. TCC will ignore everything on the line following the REM, including quotes, redirection symbols, and other commands (see below for the exception to this rule).
but this
Code:
rem >>%tmpfn%
in a BTM then it produces an error:
2403

The system could'nt find the desired file.
The alternate with :: is working correct :smile:
 
WAD - this is an ancient kludge for people who were doing:

rem > file

to create an empty file. Since this doesn't work anymore in recent versions of CMD, I could probably delete the kludge. (Which would then break some ancient existing batch files.)
 
I would prefer a correct working statement instead of an old crutch kludge.
So from my side you can delete it with pleasure :smile:
 
Also good or better :smile:
 
The help file says:
REM must be followed by a space or tab character, then the comment. TCC will ignore everything on the line following the REM, including quotes, redirection symbols, and other commands (see below for the exception to this rule).
.....
You can use REM to create a zero-byte file if you use a redirection symbol immediately after the REM command. For example, to create the zero-byte file C:\xyz:
rem>xyz

I've understand, that after the following space it "will ignore everything", but the "kludge" will have NO spaces .....
 

Similar threads