简体   繁体   English

如何使用VB.NET将FTP服务器上唯一更新的文件传输到客户端计算机?

[英]How to transfer the only updated file on FTP Server into client machine using VB.NET?

How to transfer the only updated file on FTP Server into client machine using VB.NET? 如何使用VB.NET将FTP服务器上唯一更新的文件传输到客户端计算机? I have to transfer the only updated file to client machine through FTP from server machine where changes occurs. 我必须从发生更改的服务器计算机通过FTP将唯一更新的文件传输到客户端计算机。

You should use the FileSystemWatcher Class and FTP only the files that have changed. 您应该使用FileSystemWatcher类,并且仅使用FTP更改的文件。 See the following VB.NET example . 请参见下面的VB.NET示例 Specifically, you should hook into the OnChanged event . 具体来说,您应该加入OnChanged事件

For example: 例如:

Private Shared Sub OnChanged(source As Object, e As FileSystemEventArgs)
 ' your FTP code here
End Sub    

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM