Solved

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

Posted on 2013-06-26
2
334 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
  • 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
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…

896 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now