Tools for monitoring files in a folder

I want to monitor a folder for files and alert if we dont get a file for some time.

Ravi Kiran Reddy KatkuriAnalyst ProgrammerAsked:
Who is Participating?
RobConnect With a Mentor Owner (Aidellio)Commented:
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

RobOwner (Aidellio)Commented:
Windows platform?
Will any of the files be overwritten? meaning the modified date of the file would need to be checked?
SurranoConnect With a Mentor System EngineerCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Ravi Kiran Reddy KatkuriAnalyst ProgrammerAuthor Commented:

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

RobOwner (Aidellio)Commented:
What platform are you running on?
Ravi Kiran Reddy KatkuriAnalyst ProgrammerAuthor Commented:
Windows server  platform
RobOwner (Aidellio)Commented:
Did you try any of the scripts posted above?
Ravi Kiran Reddy KatkuriAnalyst ProgrammerAuthor Commented:
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.
RobConnect With a Mentor Owner (Aidellio)Commented:
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 .

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.