commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wallace" <>
Subject commons FTP upload
Date Thu, 02 Dec 2004 22:50:29 GMT
    Using Filezilla and the Jakarta commons FTP classes, I can upload
files to my server using the Filezilla client (client and server on same
box), but when I upload using the commons classes, I get:
Canot find the directory for upload: testFile.txt (The system cannot
find the file specified) testFile.txt (The system cannot find the
file specified)    
    at Method)
why would the download succeed: ftp.downloadFile("testFile.txt
<ftp://ftp.downloadFile("testFile.txt> ",
but the upload fail: ftp.uploadFile("testFile.txt
<ftp://ftp.uploadFile("testFile.txt> ",
The error message complains the destination directory can not be found.
C:\\dev\\dummy\\ is set to be my 'home dir' on the Filezilla server. Has
anyone uploaded, using Commons FTP & Filezilla successfully please? I
tried all variations on the 'serverFile' argument, as the file is
clearly there because the download works. Perhaps this the cause? What
is a typical argument pattern? 
ftp is a wrapper class, with the method:
    public boolean uploadFile(String localFile, String serverFile)
throws IOException, FTPConnectionClosedException {
        FileInputStream in = new FileInputStream(localFile);
        boolean result = storeFile(serverFile, in);
        return result;

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