Copy Files coming in a folder over a network in C#
I receive Files in a Folder at say 2 secs interval from a host machine over " a TCP/IP network" at some Port X. I need to have a service / watcher which will 开发者_运维问答copy these Files to other location. I tried FileSystemWatcher, but it seems that the "Created event" of the watcher gets fired as soon as a byte is getting written to disk.
What is the best way to accomplish this ?
Why not run the copier on a timely basis? Say every 1 minute and copy files.
FileSystemWatcher doesn't seem to be a good option where changes happen more frequently.
精彩评论