如何知道要在Windows中复制哪些文件 [英] How to Know Which files are being copied in windows

查看:101
本文介绍了如何知道要在Windows中复制哪些文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想要一个应用程序,该应用程序将跟踪从USB驱动器复制到USB驱动器的文件列表.

我如何使用C#.net做到这一点?
有人可以帮我吗?

问候,
San

Hi All,

I would like to have an application which will track the list of files copied from and to an USB drive.

How can i do that using C#.net?
Can anyone help me plz?

Regards,
San

推荐答案

您不知道.反正不容易.

Windows在打开文件以进行读取访问的应用程序和复制操作之间没有区别.这两个操作是相同的.

这将需要Windows的低级知识以及编写驱动程序和内核级调试的专业知识.您将跟踪哪些进程/线程为任何类型的读取访问打开了哪些文件句柄,以及那些相同的进程/线程是否为写入访问打开了文件句柄.然后,您可以合理地怀疑正在进行复制操作.

祝您好运!
You don''t. Not easily anyway.

Windows makes no distinction between an application opening a file for Read access and a copy operation. The two operations are identical.

This would require low-level Windows knowledge and the know-how for writing drivers and kernel-level debugging. You''d track which processes/threads have which file handles open for any kind of Read access and if those same processes/threads have file handles open for Write access. Then you can reasonable suspect that a copy operation is going on.

Good Luck!


您可以使用类System.IO.FileSystemWatcher: http ://msdn.microsoft.com/zh-CN/library/x7t1d0ky.aspx [ ^ ].

祝你好运,
—SA
You can use the class System.IO.FileSystemWatcher: http://msdn.microsoft.com/en-us/library/x7t1d0ky.aspx[^].

Good luck,
—SA


这篇关于如何知道要在Windows中复制哪些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆