Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-06-26
2
Medium Priority
?
381 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 2000 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 2000 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

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
I originally wrote this article to compare SARDU and YUMI, but have now added Easy2Boot, since that is the one I currently use and find the easiest to create and alter.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Starting up a Project

963 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