查找复制到系统的文件

查找复制到系统的文件

问题描述:

亲爱的

我可以找到文件已在系统中复制吗?

例如:
防病毒软件会检查所有已复制到系统的文件!

对不起,我的英语不好;)

谢谢

HI dears

Can I find the file has copied in system?

for example :
An anti-virus check all of the files that has copied to system!

Excuse me for bad english;)

Thanks

确定您可以做到.

看看文件系统监视程序 [
查看页面结尾处的快速示例.
Sure you can do that.

Take a look at File System Watcher[^] class.

Create an object and handle "Created" event, it will fire when a file/folder has been created in the specified path.

Look at the quick example at the end of the page.


如果您要扫描整个硬盘,可以在Internet上找到很多示例代码.
[ ^ ]只是一个示例.要查找所有文件,只需在需要时使用"*.*"过滤器.确保允许锁定/系统文件,使用try...catch块并首先捕获所有异常.记下所有获得的记录,并为它们出现时添加特定的处理程序.
In case you mean that you want to scan the entire hard disk you can find lots of sample code on the internet.
This[^] is just one example. To find all files just use a filter of ''*.*'' where required. Make sure to allow for locked/system files, use try...catch blocks and initially catch all exceptions. Make a note of all the ones that you get and add specific handlers for those as they occur.