Solved

File\folder monitor that starts a bat file if a certain size is detected

Posted on 2013-06-26
2
369 Views
Last Modified: 2013-07-02
I have a windows application that freaks out randomly once a week and when it does it needs to be manually restarted. When the app is hanging it generates dozens of 1kb .txt files with little or no data into a local folder.

Is there any software that can live detect new files with a 1kb size and auto restart an application service or process?
0
Comment
Question by:fivepoint
[X]
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
  • 2
2 Comments
 
LVL 6

Accepted Solution

by:
BurundiLapp earned 500 total points
ID: 39280711
Do the 1kb files have the same names each time or are they randomly or sequentially named?

I don't know of anything that could actively monitor a folder but you could have a powershell script check the folder and if a certain number of .txt files are detected under a certain size it could kill the process and re-launch it.

This script could be scheduled to run every 15 minutes or so.  What is the critical time to get this app back up and running?
0
 
LVL 6

Assisted Solution

by:BurundiLapp
BurundiLapp earned 500 total points
ID: 39280736
Actually using Powershell and the PowerShellPack you can actively monitor a folder for file activity: http://social.technet.microsoft.com/Forums/scriptcenter/en-US/c75c7bbd-4e32-428a-b3dc-815d5c42fd36/powershell-check-folder-for-new-files
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Suggested Courses

627 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