注意VB.NET文件夹中的文件 [英] Watch for files in a folder in VB.NET

查看:120
本文介绍了注意VB.NET文件夹中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我们的网络中观看一个文件夹,并且如果在一天中的任何时间有任何文件丢失,我需要ftp到另一个文件夹。



这是一个可行的方法?有没有一些链接能让我朝正确的方向发展? 解决方案

使用 System.IO.FileSystemWatcher 以观察文件夹:侦听文件系统更改通知并引发事件目录或目录中的文件发生更改。



使用 System.Net.FtpWebRequest 通过FTP发送文件。


I need to watch a folder in our network and if any files get dropped in any time of the day I need to ftp to a different folder.

Is this a feasible approach? Are there some links that will take me in right direction?

解决方案

Use System.IO.FileSystemWatcher to watch the folder: Listens to the file system change notifications and raises events when a directory, or file in a directory, changes.

Use System.Net.FtpWebRequest to send the file through FTP.

这篇关于注意VB.NET文件夹中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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