• Post Reply Bookmark Topic Watch Topic
  • New Topic

FTPClient.listFiles() is not working..

 
Tapan Thakkar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!