In unix shell scripts, I could use cat > /tmp/sometempfile at the beginning of a script to receive input being piped into the script, to then do something with it. I'm trying to do the same on Windows, using built in commands, so it can work on all computers in the company without installing anything.
The 'type' command requires a filename argument / doesn't seem to support being piped to, and putting
for /F "delims=" %%a in ('more') do @echo %%a >> %temp%\sometempfile
at the beginning of the batch file is adding CR characters and otherwise screwing up just the binary parts of files I'm piping through it.
Before I give up, and install cygwin on all computers, just to get the cat command, is there any way to do this with native commands in a batch file? Switching the character set to unicode, etc?