Solved "echo." has quit working

February 24, 2018 at 13:39:32
Specs: Windows 7 ult. sp1, /intel 2.2ghz / 2G
My win-7 (32-bit) has quit supporting the "echo." to echo blank lines, so now I have no way to put a blank line into a file using batch. The OS would correctly execute this in the past, (at least in batchfiles, maybe not at the cmd prompt). I keep windows-update disabled (for this kind of reason). It works fine on my xp. Now the win-7 just gives the error '"'echo." is not recognized as a command blah blah". I've tried "enableextensions" in addition to the usual, and using @echo.
I have not changed anything in the registry nor updated any dll files, so I'm clueless as to why this quit working. Haven't googled it yet...
Ps: I did find this on stackoverflow, which worked, but still cumbersome:

REM Creating a Newline variable (the two blank lines are required!)
set NLM=^


set NL=^^^%NLM%%NLM%^%NLM%%NLM%
REM Example Usage:
echo There should be a newline%NL%inserted here.

I would never have thought of that!
pps: (sorry!) also found a much better fix:
echo[
which I had forgotten about if I ever knew that syntax to begin with, so
consider the problem solved I guess. I would still very much like to know why the dot syntax failed after working previously...

message edited by nbrane


See More: "echo." has quit working

Report •

#1
February 25, 2018 at 05:11:18
This will work.

REM Creating a Newline variable (the two blank lines are required!)
set NLM=^


set NL=^^^%NLM%%NLM%^%NLM%%NLM%
REM Example Usage:
echo There should be a newline%NL%
echo inserted here.

If you need additional newlines, added to the line, simply put an additional %NL% right behind the last %NL%.


Report •

#2
February 25, 2018 at 06:05:57
✔ Best Answer
im thinking about a permanent solution:

try making echodot.bat & place it in system32

containing:

set NL=^^^%NLM%%NLM%^%NLM%%NLM%
%NL%
exit/b

& then just call it like:

echo test1
echo test2
echodot
echo test3

result:

test1
test2

test3

i5-6600K[delid]@4.814GHz/4.613GHz cache@1.385v | 2x4GB Crucial-DDR4-2133@14-14-14-28 1T 2808MHz@1.37v
ASUS Z170K
Samsung 250GB SSD 850 EVO
MSI Armor RX 570 4GB@1340c/1965m BiosMod
VS450

message edited by hidde663


Report •

#3
February 26, 2018 at 11:37:36
Hello again, and thanks. Paul's solution was what I ran across in stack-overflow:
https://stackoverflow.com/questions...
, and is very strange indeed, to me. I about half or less understand how it works, although I get the general idea about using escapes. further reading, which I didn't do the first time, revealed move about echo. issues - worth reading.
I was going to fall back on vbscript if all else failed, or god forbid create a .com program in debug. Fortunately that last solution in prev. post worked (for now!): echo[
(or:
echo] echo\ echo/ echo+ echo( echo, echo= echo: echo; echo,
and maybe others)
To beat all, the dot is working again. I have not re-booted nor made any changes to the OS. I'm going to switch to using the ( which seems to be the consensus.

Report •
Related Solutions


Ask Question