Solved Logging Plink output via batch

March 16, 2009 at 12:29:38
Specs: Windows XP, 1.3 Ghz / 1 Gb RAM
I'm trying to use plink.exe to connect to a device, run some commands, send the output to a text file on my local system, and exit. Here's what I have:

plink -ssh -l MYNAME -pw MYPASS -m .\empty.txt XXX.XXX.XXX.XXX <.\commands.txt >>output.txt

I see all the output in the command window, but it only logs the very first line of text in the output.txt file. I was a little confused by the .\empty.txt as well (a blank text file that seems to stay blank, but if I put the .\commands.txt file in it's place, it won't execute the commands). Has anyone tried this successfully before?

See More: Logging Plink output via batch

Report •

March 16, 2009 at 20:40:52
✔ Best Answer
(plink -ssh -l MYNAME -pw MYPASS -m .\empty.txt XXX.XXX.XXX.XXX <.\commands.txt)>>output.txt 2>>&1

Report •

March 17, 2009 at 11:50:38
Worked like a charm! This is a big help, thanks a lot!!!

Report •

Related Solutions

Ask Question