Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

721 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