Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

746 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

12 Experts available now in Live!

Get 1:1 Help Now