Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Any Windows Script - Count Files in Directory and compare at a later time

$
0
0

Hello there, I am very new to scripting and am struggling with where to even begin with one of the tasks I have been presented with. I can work out in plain english exactly what I need a script to do however I cannot begin to work out the logical construction of the script or scripts and/or the syntax of it.

- Check a folders contents at a time, for example 5am.
- Count how many files are in the folder.
- At a later time check the folders contents again, for example lets say at 6am.
- Count how many files are in the folder which are at least 1 hour old (to exclude any that have been added since the first check).
- Compare result of both checks.
- If 6am result is equal to or greater than 5am result send an email alert with failed status.
- If 6am result is less than 5am result send an email alert with passed status.

Any help would muchly be appreciated.

Andrew Guy


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>