I'm trying to do the following command in CMD to save %PATH% with newlines to a text file.
"@echo. %PATH:;= & @echo.%" > path.txt
With this I try to do it with line breaks so that I can then do a findstr from that file. But it gives me error The line written is too long. And the same if I try to pipe it to another command like findstr instead of the file. I am doing something wrong? I thought that to group commands they were the quotes but not anyway.
It's a bit twisted and dark, but this
pathnl.bat
one I think does what you're looking forExplanation here .