监视文件夹中是否有新文件添加 [英] To monitor folders for new files addition

查看:98
本文介绍了监视文件夹中是否有新文件添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OS-Windows 7

我需要监视一个文件夹,如果有任何新的PDF或任何文件添加到该文件夹​​,则应该显示为警报消息弹出给用户.

通过简单的批处理编程是否可能.

任何人都可以帮忙.

谢谢.

问候,Prashanth

OS - Windows 7

I need to monitor one folder, if any new PDF or any files, getting added to that folder, should be shown as alert message pop up to the user.

Is it possible by simple batch programming.

Can anyone help on this.

Thank you.

Regards,Prashanth

推荐答案

您将需要创建一个应用程序来执行此操作.如果需要,可以将该应用程序作为控制台应用程序.这是为您完成所有工作的文章.如果满足您的需求,您甚至可以只运行exe文件:

在C#.NET中监视文件夹活动 [ C#:使用以下命令监视文件或目录的应用程序FileSystem Watcher [ http://www.devproconnections.com/article/net-framework2/c-windows- service-142435 [ ^ ]
You would need to create an application to do this. You could make that application a console application if you wanted. Here is an article where all of the work is done for you. You might even get a way with just running the exe file if it fits your needs:

Watching Folder Activity in C# .NET[^]

Other alternatives include:

C#: Application to Watch a File or Directory using FileSystem Watcher[^]
http://www.devproconnections.com/article/net-framework2/c-windows-service-142435[^]


这篇关于监视文件夹中是否有新文件添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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