TheWhite
01-07-2010, 01:49 AM
import com.jscape.inet.ftp.Ftp;
import com.jscape.inet.ftp.FtpException;
import com.jscape.inet.ftp.Fxp;
public class test {
public static void main(String[] args) throws FtpException, InterruptedException {
Ftp source = new Ftp(host, user, pass, port);
source.connect();
source.makeDirRecursive("/blah/folder/");
source.setDir("/blah/folder/");
String listing = source.getDirListingAsString();
System.out.println(listing); //works
Ftp dest = new Ftp(host2, user2, pass2, port2);
dest.connect();
dest.makeDirRecursive("/blah/foo/folder/");
dest.setDir("/blah/foo/folder/");
listing = dest.getDirListingAsString();
System.out.println(listing); //works
Fxp fxp = new Fxp();
fxp.transferDir(source, dest, "."); //see notes below on what happens
}
}
source spams this over and over and over again very fast:
PWD
257 "/blah/folder/" is current directory.
CWD .
250 Directory changed to /blah/folder/
PWD
257 "/blah/folder/" is current directory.
PASV
227 Entering Passive Mode (##,###,##,##,###,2 changing numbers)
LIST
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
dest spams this over and over and over again very fast:
PWD
257 "/blah/foo/folder/" is current directory.
MKD .
550 /blah/foo/folder/: Failed to create.
CWD .
250 Directory changed to /blah/foo/folder/
PWD
257 "/blah/foo/folder/" is current directory.
Whats going on here? Both servers are Serv-U v6.4. Actually, its the same server and same account. I was testing the FXP so I can clearly see the results for each.
import com.jscape.inet.ftp.FtpException;
import com.jscape.inet.ftp.Fxp;
public class test {
public static void main(String[] args) throws FtpException, InterruptedException {
Ftp source = new Ftp(host, user, pass, port);
source.connect();
source.makeDirRecursive("/blah/folder/");
source.setDir("/blah/folder/");
String listing = source.getDirListingAsString();
System.out.println(listing); //works
Ftp dest = new Ftp(host2, user2, pass2, port2);
dest.connect();
dest.makeDirRecursive("/blah/foo/folder/");
dest.setDir("/blah/foo/folder/");
listing = dest.getDirListingAsString();
System.out.println(listing); //works
Fxp fxp = new Fxp();
fxp.transferDir(source, dest, "."); //see notes below on what happens
}
}
source spams this over and over and over again very fast:
PWD
257 "/blah/folder/" is current directory.
CWD .
250 Directory changed to /blah/folder/
PWD
257 "/blah/folder/" is current directory.
PASV
227 Entering Passive Mode (##,###,##,##,###,2 changing numbers)
LIST
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
dest spams this over and over and over again very fast:
PWD
257 "/blah/foo/folder/" is current directory.
MKD .
550 /blah/foo/folder/: Failed to create.
CWD .
250 Directory changed to /blah/foo/folder/
PWD
257 "/blah/foo/folder/" is current directory.
Whats going on here? Both servers are Serv-U v6.4. Actually, its the same server and same account. I was testing the FXP so I can clearly see the results for each.