File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT tell telnet task problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT tell telnet task problem" Watch "ANT tell telnet task problem" New topic

ANT tell telnet task problem

aresh babu
Ranch Hand

Joined: Aug 31, 2008
Posts: 65
HI All,

i am writing ANT script to call remove server by using telnet task. I wrote like ths

<target name="load">
<telnet server="server name" userid="username" password="pass">
<write>cd sms</write>
<write>ls -al</write>
<write>chmod 777 *</write>
<write> rm -rf folder1</write>
<write>rm -rf test.ear</write>

Here my problem is i am not able to delete the folder and the ear file also.
But other operations are performing succsfully except deleting the files and folders.

Is there any other way to delete files and folders in the remote system by using ANT script???

Please let me know and help me urgently.

Thanks in advance
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

What errors are you getting back? If you perform the steps manually, does it work?

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
I agree. Here's the link:
subject: ANT tell telnet task problem
It's not a secret anymore!