.bat line over 80 characters

December 6, 2010 at 13:38:58
Specs: Windows XP
I have the below line in my batch file, unfortunatly when replaced with the actual lines it extends the line to over 80 characters and thus fails.

if "%%b" EQU "%findthis4%" set write=%replacewith4%

Any help on how to get this to work would be appreciated.

See More: .bat line over 80 characters

Report •

December 6, 2010 at 15:02:36
You should post programming related queries here:


Report •

December 6, 2010 at 15:30:41
Sorry - Wasn't sure. Thanks for moving to the right place.

Report •

December 6, 2010 at 20:21:16
I don't know what the problem is but I doubt that it's the line length.

This works. [Length ~234.]


@echo off & setLocal EnableDELAYedeXpansion

if "%PATH%" equ "%PATH%" echo y
if "C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;E:\WATCOM\BINNT;E:\WATCOM\BINW;c:\util;c:\tc\bin;c:\QB45;" equ "C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;E:\WATCOM\BINNT;E:\WATCOM\BINW;c:\util;c:\tc\bin;c:\QB45;" echo OK

Life is too important to be taken seriously.


Report •

Related Solutions

December 7, 2010 at 11:54:31
Changing a line in a batch file can change the whole structure and cause a whole rewrite.

Just a thought

if "%%b" EQU "%findthis4%" goto :next
set write=%replacewith4%

if not "%%b" EQU "%findthis4%" goto :error
echo some text
goto :start

Perhaps if you posted the whole bat it could be tested out.

Report •

Ask Question