aspose file tools*
The moose likes Other Java Products and Servers and the fly likes FTPClient.listFiles() is not working.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "FTPClient.listFiles() is not working.." Watch "FTPClient.listFiles() is not working.." New topic
Author

FTPClient.listFiles() is not working..

Tapan Thakkar
Greenhorn

Joined: Mar 09, 2010
Posts: 24
hey guys..

i am writing an application which uploads file to FTPServer.

in which i need to check whether a file exist on FTPServer or not , if yes then append new data to that file else create new file.

first time it creates new file successfully.to check whether file already exists on server i am using this code..

FTPClient client = new FTpClient();

final String _cwdFTP = client.printWorkingDirectory();
final FTPFile[] list = client.listFiles(_cwdFTP);

but list always comes null and this happens when i am connected through WIRELESS CONNECTION. but same code works fine when i am connected through LAN CABLE.

please help me to solve this problem.

Thanks

Regards
Tapan Thakkar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FTPClient.listFiles() is not working..