Search code examples
windowshttp-redirectbatch-processingpiping

Redirection and piping in Windows environment


I wonder if there's a way to construct a one-liner which does the job of these two consecutive commands:

echo %path% > mypath.txt
notepad mypath.txt

Something like notepad < (echo %path% > mypath.txt) doesn't do the trick...


Solution

  • echo %path% > mypath.txt&notepad mypath.txt
    

    should work for you.