I’m trying to produce file listing of a given directory and it’s sub directories in a ftp server. The server works fine, and I have been successfully able to produce the file listing of the current directory. When I try to list the subdirectories and their files is where it gets complicated. I was asked not to use a recursion
Tag: ftp
Apache Commons FTP Passive mode, how to set remote listening port (data stream)
I try to connect with an FTP server with apache-commons-net-3.7.2 (implicit TLS, double factor authentication with client cert + login/password). I can authenticate myself, enter in passive mode, but the client doesn’t succeed in connecting to the server in order to get data by the data socket. I can connect myself, on the same computer, with WinSCP (same settings). I
Can you access files on the remote FTP server with RandomAccessFile?
I’m trying to read the file on the FTP remote-server using Apache Commons Net library. retrieveFileStream returns InputStream and put it in BufferedReader. But, I want to use RandomAccessFile (to …
Does Apache Commons Net FTPClient use passive or active mode by default?
The app I’m working with uses FTPClient class from Apache Commons Net to connect and transfer files to a FTP server. I’m trying to establish if it’s doing that in a passive or active mode by default …
Apache Java FTP client does not switch to binary transfer mode on some servers
I’m using org.apache.commons.net.ftp library to work with FTP servers. I use about 5 FTP servers and one of them doesn’t work properly (for me). For uploading files I also use method ftpClient….
Make FTP server return files listed by timestamp with Apache FTPClient
I have written this below code to connect to a remote FTP Server (vsftp in CentOS 6). (For brevity Exception handling is not shown here) FTPClient ftpClient = new FTPClient(); ftpClient….
FTPClient.listFiles is not returning time in seconds
private static void getFTPFileProperties(FTPClient client, String ftpLocation, String pattern) throws IOException { FTPFile[] fileList=null; fileList = client.listFiles(); for(…
How to get info of an FTPFile
I am using ApacheCommons to connect to a server and get information of a specific file. I am looking for a method like FTPFile file = ftpclient.getFile(path); or something like this, so I can give it …
Java FTP 550 error
I’m getting this error (550 the filename, directory name, or volume label syntax is incorrect. ) I think the url is correct (obviously not though). Any thoughts? Here is the url: Here is the invocation method: ftp class: Answer If the FTP server is running Windows, the ‘*’ characters are the problem. Windows file names may not have asterisks.
Checking file existence on FTP server
Is there an efficient way to check the existence of a file on a FTP server? I’m using Apache Commons Net. I know that I can use the listNames method of FTPClient to get all the files in a specific …