如果您正在寻找一种高级工具来监视文件夹或目录(folder or directory)发生的更改,那么DirectoryMonitor就是您的最佳选择。该程序有多种形式,其中一种是完全免费的。免费版可以处理大多数人的监控任务,但如果您需要更多功能,您可以点菜(la carte)购买,也可以以 99 美元的价格购买包含所有内容的专业版。(Pro version)
同样,该程序的免费版本在监控方面做得非常出色,足以满足我的需求。在本文中,我将引导您完成设置并向您展示它的功能。仅供参考(Just FYI),该程序不会捕获文件内容的实际更改,仅捕获文件/文件夹已被修改、添加、删除或重命名的事实。
继续下载程序并安装它。在安装过程中,您将看到一个窗口,您可以在其中选择某些组件。
您可以将它们全部选中,但如果您不打算(t plan)购买该程序,则可以取消选中某些选项,例如Grid Log、Sounds、Emailer 和 Database 插件(Emailer and Database plugins)。这四个插件可以在程序内以每个 5 到 20 美元的价格单独购买。
安装后,单击右上角的添加(Add)按钮或单击(right or click)目录,(Directories)然后单击添加(Add)。您现在应该看到主添加文件夹对话框(Add Folder dialog)。
在这里您可以选择所有选项,其中有很多。首先,继续并选择您要监视的目录。这个程序最好的地方是你可以在免费版本中监控本地或网络目录。对于网络目录,您可以根据需要添加用户名和密码。
在事件(Events)下,您可以选择监视新文件(New Files)、修改(Modifications)、删除(Deletions)、重命名(Renames)和文件访问(File Access)。在Options下,您可以选择仅监视顶级目录(level directory)或所有子目录(如果您愿意)。您还可以监控对文件属性和安全设置的任何更改。专业版(Pro)或付费选项旁边有一个小锁。最后,您可以选择是否只监视目录、文件或两者。
如果您点击Text Log,您可以继续并启用文件日志记录(file logging)并选择您想要的输出格式。(output format)日志文件(log file)将包含您将在主程序页面(program page)上的文本日志视图(Text Log view)中看到的相同数据。
在Execute 选项卡下,您可以选择在(Execute tab)事件发生时(event occurs)执行应用程序。如果您想运行将信息输入数据库等的命令行程序或脚本,这会很方便。如果您真的需要,(command line program or script)声音(Sounds)、电子邮件和数据库选项卡(Emailer and Database tabs)都是额外付费选项。
添加文件夹后,您将在顶部窗口中看到它,并带有绿色复选标记(check mark)。这意味着它目前正在被监控。现在您可以通过添加、重命名和修改文件和文件夹来测试它。您可以在上面看到我在 5:34 创建了一个名为New Text Document.txt的新文件,然后将其重命名为New File.txt。我认为修改它并多次访问该文件。
就像我之前提到的,这个程序不捕获文件的内容,所以你看不到我在文本文件(text file)中添加了什么,只是我修改了几次。免费版的另一个限制是,除非您购买PRO 版(PRO version),否则您不能将其作为Windows 服务(Windows service)在后台运行。这意味着您必须始终让应用程序在您的计算机上运行。值得庆幸的是,您可以关闭它,它会简单地移动到任务栏中的通知区域(notification area)。
我发现的另一个有点烦人的限制是你得到了很多Modified 事件(Modified event)而没有准确显示原因。例如,当您打开文件并保存有或没有更改时,您会得到一个Modified 事件(Modified event),这是有道理的。但是,如果您更改文件的权限或任何属性(如Hidden或 Read-only),您也会获得Modified。如果它告诉您权限已更改或文件/文件夹的属性已更改,则会更有用。
不过,总的来说,该程序在让您知道文件或文件夹(file or folder)发生了什么事情方面做得很好。该程序会经常更新,并且总是会添加新功能。他们似乎也在论坛中听取客户的意见,因为即将推出的一些新功能是来自论坛用户的直接请求。如果您知道一些编码,您也可以编写自己的插件,尽管您必须购买PRO 版本(PRO version)才能做到这一点。
如果您尝试设置特定类型的监控,请在评论中告诉我们,我们可以尝试帮助您解决任何困难。享受!
Monitor a Folder for Changes Using Directory Monitor
If you’re looking for an advanced tool to monitor changes that oсcur to a folder or directory, look no further than DirectoryMonitor. The program comes in many forms, one being completely free. The free version can handle the monitoring tasks for most people, but if you need more features, you can either purchase them a la carte or you can buy the Pro version for $99 which includes everything.
Again, the free version of the program does an excellent job of monitoring and was more than enough for my needs. In this article, I’ll walk you through setting it up and show you what it’s capable of doing. Just FYI, this program does not capture the actual change in content of files, only the fact that files/folders have been modified, added, deleted, or renamed.
Go ahead and download the program and install it. During the install, you will get a window where you can choose certain components.
You can leave them all checked, but if you don’t plan on buying the program, then you can uncheck certain options like the Grid Log, Sounds, Emailer and Database plugins. Those four plugins can be purchased individually for $5 to $20 apiece inside the program.
Once installed, click on the Add button at the top right or click on Directories and then click Add. You should now see the main Add Folder dialog box.
Here you can choose all the options, which there are quite a few. To start off, go ahead and choose the directory you want to monitor. The best thing about this program is that you can monitor local or network directories in the free version. For network directories, you can add a username and password if required.
Under Events, you can choose to monitor for New Files, Modifications, Deletions, Renames, and File Access. Under Options, you can choose to monitor just top level directory or all sub-directories too if you like. You can also monitor any changes to file attributes and security settings. The Pro or paid for options have a little lock next to them. Lastly, you can choose whether you want to monitor just directories, just files or both.
If you click over to Text Log, you can go ahead and enable file logging and choose the output format you desire. The log file will contain the same data that you will see in the Text Log view on the main program page.
Under the Execute tab, you can choose to execute an application whenever an event occurs. This can be handy if you want to run a command line program or script that enters the information into a database, etc. The Sounds, Emailer and Database tabs are all extra paid options if you really need them.
Once you have the folder added, you’ll see it in the top window with a green check mark. This means it is currently being monitored. Now you can test it out by adding, renaming, and modifying files and folders. You can see above that I created a new file at 5:34 called New Text Document.txt and then renamed it to New File.txt. I think modified it and accessed the file several times.
Like I mentioned earlier, this program does not capture the content of the files, so you can’t see what I added to the text file, only that I modified it several times. Another limitation to the free version is that you can’t it in the background as a Windows service unless you purchase the PRO version. This means you have to keep the app running on your computer all the time. Thankfully, you can close it and it’ll simply move to the notification area in the taskbar.
The other slightly annoying limitation that I found was that you get a lot of Modified events without it showing exactly what was the cause. For example, when you open the file and save it with or without changes, you get a Modified event, which makes sense. However, if you change the permissions on the file or any property like Hidden or Read-only, you get a Modified even too. It would be more useful if it told you a permission was changed or a property of the file/folder was changed.
Overall, though, the program does a great job of letting you know when something is happening to a file or folder. The program is updated very often and new features are always being added. They also seem to listen to their customers in the forums because several of the new features coming are direct requests from forum users. If you know some coding, you can also write your own plugins, although you have to buy the PRO version to do that.
If you are trying to setup a specific type of monitoring, let us know in the comments and we can try to help you out with any difficulties. Enjoy!