开发者

How do backup applications detect renames?

I recently noticed that SyncToy (by MS) can detect renamed and moved files.

How do they do that? Is it only an elaborate guessing game based on file properties开发者_如何学Go (last modification date, creation date, and file size)?


One way to catch file renames, deletes and other is to use FileSystemWatcher class (using dotnet framework).
If you develop an application (or a service) you can monitor file system changes and execute a custom action (with your code, so you can do anything you need).
You can even set which directory monitor and if you want subdirs too.
Problems can arise with permissions on folders and files, but this is not part of your question :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜