Tools for monitoring files in a folder

Posted on 2014-01-19
Last Modified: 2014-04-10
I want to monitor a folder for files and alert if we dont get a file for some time.

Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 43

Expert Comment

ID: 39793386
Windows platform?
Will any of the files be overwritten? meaning the modified date of the file would need to be checked?
LVL 43

Accepted Solution

Rob earned 133 total points
ID: 39793406
A simple script should do it that can be scheduled to run as often as you need to test.

this is vb script, assuming windows platform:

Set wshShell = CreateObject( "WScript.Shell" )
Set wshSystemEnv = wshShell.Environment( "SYSTEM" )

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\FSO")
Set colFiles = objFolder.Files

' Display the current value
If wshSystemEnv( "FileCount" ) = colFiles.Count Then
' Display an ALERT
' Set the environment variable
wshSystemEnv( "FileCount" ) = colFiles.Count

End If

Open in new window


Assisted Solution

Surrano earned 67 total points
ID: 39793525
Depending on the use case it may become quite complex.
Below is a unix (bash) shell solution that assumes
- a file modification timestamp is in accordance with its appearance in the directory.
- a changed file is considered "new"
- only regular files (not directories, FIFOs, symlinks, block devices, etc) are checked


# seconds to sleep
# directory to monitor

# establish baseline
touch "$BASELINE"

while true; do
  sleep $SLEEP
  touch "${BASELINE}.tmp"
  newfile=`find "$DIR" -type f -newer "$BASELINE" | head -1`
  mv "${BASELINE}.tmp" "$BASELINE"
  if [ "$newfile" = "" ]; then
    # do the alerting of your choice

Open in new window

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.


Author Comment

by:Ravi Kiran Reddy Katkuri
ID: 39828558

All the files will be over written if not processed by a job.

LVL 43

Expert Comment

ID: 39852499
What platform are you running on?

Author Comment

by:Ravi Kiran Reddy Katkuri
ID: 39902486
Windows server  platform
LVL 43

Expert Comment

ID: 39904691
Did you try any of the scripts posted above?

Author Comment

by:Ravi Kiran Reddy Katkuri
ID: 39911137
I am not a expert in scripting. I am looking for tools with user interface and easy to use. It can be open source or commercial one.
LVL 43

Assisted Solution

Rob earned 133 total points
ID: 39911543
Sorry I haven't used any of the following ,but the first link is a review of the top 10 tools to monitor files.

"Watch 4 folder" Comes up a lot and well recommended. There is a free Version but it will only monitor one folder. Claims to capture up to 12 or 13 events but to not overload your system l would only start with the events you're most in need of .


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what hardware you have and get the most up to date drivers from the manufacturer! Automatically Get Your Drivers There is a number of great programs that will detect your hardware and find drivers for you automatically! Here is a link …
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question