On 26 Feb 2022, 02:54, Bret Johnson wrote:
I've tried creating an ECHO environment variable. With older versions of DOS:
SET ECHO=ECHO OFF
and with newer versions of DOS:
SET ECHO=@ECHO OFF
then at the beginning of all batch files I put a:
%ECHO%
That works with older versions of DOS but not newer versions. With newer versions, it sees the "%" at the beginning of
the line instead of the "@" and looks for an executable file called "@ECHO" instead of seeing the
"@" as the "hide this line" character.
Anyway, any other ideas on how to resolve the ECHO/@ECHO issue?
I don't think that this can be solved -- because there are so many
different command interpreters out there, and every one acts at least a
tiny little bit differently...
I just tried "SET ECHO=@ECHO OFF" and "%ECHO%" in a batch file with 4DOS
(a replacement for the COMMAND.COM command interpreter of any given DOS)
and it worked.
How about using 4DOS as a default SHELL, i.e. set SHELL= in CONFIG.SYS
(you already rely on SET ECHO for your batch files...) and this will
solve your issue on every DOS, regardless of the exact version.
A.
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user