Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
thanks I have got your points


My scenario is

I have to download a file automatically from FTP as file comes there ....

that's why i tried to work with File Watcher with Timer tick event but its locally working fine but not with FTP

so how can i manage all this task
thanks
Posted
Updated 14-Jul-11 2:00am
v2

You asked this question yesterday and JSOP gave you the answer;

FileSystemWatcher with FTP using C#[^]

If you have a problem with the answer leave a comment at it.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Jul-11 17:09pm    
That's correct, but there is a solution based on server-side programming. On the page you commented there is my comment. See also my solution.
--SA
You cannot use the FileSystemWatcher class with an FTP folder. It's not going to work, period. There's no way around it.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 13-Jul-11 17:08pm    
Well, I agree, my 5, but only if you consider client-part programming only. If understand you perfectly if you don't want to consider development for server part; it may be not accessible to OP it all, and so forth.

If there is a possibility to program for server part, the problem is solvable.
Please see my solution.
--SA
Dave Kreskowiak 13-Jul-11 18:31pm    
That made no sense. But, my point was there is no way to get the FileSystemWatcher to work over FTP. You'd have to "roll-your-own" component to get the equivilent functionality.
You cannot use FileSystemWatcher class with FTP folder. To achieve what you want, you need pretty more solution to be implemented on the server part.

Do you have access to the server and ready to develop for server part? If you can do it, you could implement custom notification service based on TCP and FileSystemWatcher working "by subscription". The clients could connect to this service and subscribe for notification of the certain directory withing part of the file system served up. This service could also implement FTP protocol, just to put it all together. Alternatively, it all could be done based on you custom (application-level) protocol, without any FTP (which is effective enough but pretty archaic anyway).

—SA
 
Share this answer
 
Comments
Espen Harlinn 13-Jul-11 17:59pm    
Good point - my 5, you're righ so somebody else pulled the trigger a bit to fast, perhaps not unusual if you've been outlawed :)
Sergey Alexandrovich Kryukov 13-Jul-11 18:20pm    
Thank you, Espen.
Excuse me, what do you mean by pulling a trigger?
--SA
Espen Harlinn 13-Jul-11 18:31pm    
JSOP, sometimes answering faster than he reads :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900