如何跟踪ftp位置的Excel文件的更改? [英] How to keep track of changes of Excel files which are in ftp location?

查看:109
本文介绍了如何跟踪ftp位置的Excel文件的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


每当要存储在ftp位置的Excel文件[MyFile.xls]中发生任何版本时,我都希望生成事件/消息.

我将使用C#和ADO.Net.

有人可以帮我吗?
谢谢和问候,
Avishek

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

推荐答案

您可以创建Windows服务,该服务将在后台运行,并且使用FileSystemWatcher class在该服务中,您可以跟踪对特定更新所做的更新通过某些外部程序进行归档.

只是在Google中搜索Google FileSystemWatcher ,您会发现很多相同的示例.
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.


我也做过同样的事情,FSW在同一系统中的文件上运行良好,但是FTP到底是什么精确定位,如果文件位于ftp中,该如何在SystemFileWatcher中给出文件的路径?
FileSystemWatcher fwatch = new FileSystemWatcher();
fwatch.Path = @"C:\ MyDirectory";//工作正常
fwatch.Path = @"ftp://ftp.abcd.net/;//给予错误
出路在哪里?
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?


这篇关于如何跟踪ftp位置的Excel文件的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆