查找复制到系统的文件 [英] find the file that copy to system
本文介绍了查找复制到系统的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的
我可以找到文件已在系统中复制吗?
例如:
防病毒软件会检查所有已复制到系统的文件!
对不起,我的英语不好;)
谢谢
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, usetry...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.
这篇关于查找复制到系统的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文