ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nehal Patel <>
Subject ANT script to telnet to Windows 2008 R2 server.
Date Thu, 01 Mar 2012 04:54:19 GMT
I'd like to use telnet and connect to another Windows server; yes TELNET
Server is installed on the target server.  Here is my task:
<target name="connect-by-telnet">
<telnet server="BIGBIRD" userid="bert" password="ernie">
<write>dir > test.txt</write>

And here is my output:
D:\User1>C:\apache-ant-1.7.1\bin\ant -buildfile
Buildfile: install-deploy.xml


   [telnet] Welcome to Microsoft Telnet Service
   [telnet] login:
   [telnet] bert
   [telnet]  bert
   [telnet] password:

(and it just hangs)

First question = should i login manually to know what my promt will look
like, so i can use it in "<read>$</read>" statement?  Should it look like
"<read>C:\Documents and Settings\Bert></read>" instead?

Second question = why is i hanging?

I just want to connect, do a DIR and output to a txt file, and then quit.

Thank you in advance.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message