Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I want to generate an event/message whenever there is any edition takes place in an Excel file[MyFile.xls] which is stored in a ftp location.

I will use C# and ADO.Net.

Can any one help me?
Thanks and Regards,
Avishek
Posted
Updated 31-May-10 0:59am
v2

You can create a windows service which will run in the background and in that service using FileSystemWatcher class you can keep track of the updates done on a specific file by some external program.

Just google FileSystemWatcher in google you will find so many examples for the same.
 
Share this answer
 
Comments
avishekrc 31-May-10 7:57am    
Please look at the answer below,I could not post it in the comment,hence posting it here.
PSK_ 31-May-10 8:36am    
FileSystemWatcher won't work over ftp, it is meant for local system only.
If you can’t install your application on the FTP server in that case you need to write a pooling service which takes cares of the file updates manually. Just remember that in FTP the file gets written in parts so make sure that file is complete before starting your process.
I have done the same,The FSW is working fine on files in the same system,but what bout FTP located files?Precisely,How to give the path of the file in SystemFileWatcher if the file is in ftp?
FileSystemWatcher fwatch=new FileSystemWatcher();
fwatch.Path=@"C:\MyDirectory";//working fine
fwatch.Path=@"ftp://ftp.abcd.net/;//giving error
what's the way out?
 
Share this answer
 

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