Written line is too long - CMD

2

I try to make the following command in CMD to save% PATH% with line breaks in a text file.

"@echo. %PATH:;= & @echo.%" > path.txt

With this I try to do it with line breaks to then make an findstr from that file. But I get error The written line is too long. And the same if I try to send it through a pipe to another command as findstr instead of to the file. I am doing something wrong? I thought that to group commands were the quotes but not like that.

    
asked by Lorthas 29.09.2016 в 23:40
source

1 answer

2

It's a bit twisted and dark, but this pathnl.bat I think it does what you're looking for

@echo off
setlocal EnableDelayedExpansion
set "token=!PATH!"
echo !token:;=^

!

Explanation here .

    
answered by 30.09.2016 / 00:26
source