I've been messing around with .cmd scripts, and wanted to practice piping. I wrote one script to make files, and another to edit them with Notepad++. The making script (called create.cmd) is as follows:
@echo off
copy nul %1 > nul
echo %1
And the edit script (called edit.cmd) is as follows:
@echo off
start notepad++.exe %1
Now, I wanted to try and make a file, and then pipe its output (hence the echo line) in the form of the name of the file to the edit script. So what I wrote was this:
create foo.txt | edit
However, this fails - I get an open Notepad++ window, but my newly-created file does not appear there. What am I missing or doing wrong here?