Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Files from a FTP Server

Status
Not open for further replies.

JVZ

Programmer
Sep 3, 2002
205
CA
Need some help/directions with writing some code to listen to a FTP Server for new files...and if a new file is defected then move the file to a directory...let say C:\incoming\ for processing...

What I need help with is once I'm connected to the FTP server how do I check for new files...Do I use something like
Code:
listFiles()
?


Thanks for you help in advance!

 
>> What I need help with is once I'm connected to the FTP
>> server how do I check for new files...Do I use something
>> like listFiles()?

Connected how? Your using a java.net.Socket? If that is the case there is no listFiles() method. If you have some third party FTP library then we don't have any idea how to use it.

There are many third party free Java FTP libraries available. If you have a buisness need i suggest using one of them. Try a google for "java ftp api" you should find plenty.

If you desire to write your own you will use Socket and learn the FTP protocol to communicate with the server. You will research the protocol via the RFC's

-pete

 
That what I figured, I found a couple of FTP API I just started playing with them...just wanted to see if there was something I was missing..

Thanks...BTW Congrat on being voted TipMaster!
 
>> Thanks...BTW Congrat on being voted TipMaster!

Thanks [cheers]
-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top