How to copy a directory from a windows system to a remote windows system using ant
there is one scp command and FTP command, please provide me an example to perform this task using scp and ftp.
Also scp requires SSH which is not common for windows system.
So how to use SCP on windows system using ant
Also if you know any better approach for windows system using ant or java, please share
Also there is one SC command(don’t know how to use it)
Download:
or Upload:
Ant scp task provides attributes such as localFile and remoteFile to replace “file”, and localTofile / localTodir and remoteTofile / remoteTodir to replace “dir”. Using these attributes can help avoid confusion when you need some scp tasks to get files from the server to local machine, while others to upload files from the local machine to server.
Like this (for uploading):
Check the ant manual to see more information:
http://ant.apache.org/manual/Tasks/scp.html
Note:
1. Avoid copying multiple files; Copy a zip archive and a ant build file together with it, and unzip on target machine.
2. Using scp, you need to setup ssh server on the target machine; you also need to put jsch.jar in your ANT_HOME/lib. The jsch.jar can be downloaded from