Computing.Net > Forums > Programming > Logging Plink output via batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Logging Plink output via batch

Reply to Message Icon

Name: keridbey
Date: March 16, 2009 at 12:29:38 Pacific
OS: Windows XP
CPU/Ram: 1.3 Ghz / 1 Gb RAM
Subcategory: Batch
Comment:

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?



Sponsored Link
Ads by Google

Response Number 1
Name: reno
Date: March 16, 2009 at 20:40:52 Pacific
Reply:

(plink -ssh -l MYNAME -pw MYPASS -m .\empty.txt XXX.XXX.XXX.XXX <.\commands.txt)>>output.txt 2>>&1


0

Response Number 2
Name: keridbey
Date: March 17, 2009 at 11:50:38 Pacific
Reply:

Worked like a charm! This is a big help, thanks a lot!!!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Logging Plink output via batch

log info to txt batch file www.computing.net/answers/programming/log-info-to-txt-batch-file/13658.html

Log batch file www.computing.net/answers/programming/log-batch-file/15257.html

Batch file to concatenate files www.computing.net/answers/programming/batch-file-to-concatenate-files/12391.html