vishu
vishu

Reputation: 51

How to create or delete a folder on the Unix machine using Ant task which runs on Windows machine

I need to delete a directory in Unix and create a new one.

All should be part of Ant task in Windows machine

Upvotes: 1

Views: 832

Answers (3)

рüффп
рüффп

Reputation: 5448

Here is the SSHExec documentation: http://ant.apache.org/manual/Tasks/sshexec.html

Upvotes: 0

vishu
vishu

Reputation: 51

I used SSHEXEC to create and delete directory on remote unix machine.I just return shell script to create and delete directory and run that using sshexec. Same thing we can do using FTP,But i dont have access to ftp so i used sshexec its working good.

Upvotes: 1

t0mm13b
t0mm13b

Reputation: 34592

It might be worth it to try it this way as I am not 100% sure if you can actually script a logging in, security implications otherwise, your password would be exposable...so I have not really done this before by using putty -m using the script in place.

putty host -l login_name -pw password -m my_script

my_script would contain

rmdir some_directory_name

The other way I can think of it is to use AutoIt, which is a BASIC like syntax and to automate the process of logging on, and feeding a rmdir directory_name, perhaps to make it more flexible, supply the host, user id, password and the directory name to the autoit script which, can by the way be compiled to a standalone program...

Upvotes: 1

Related Questions