Answer the question
In order to leave comments, you need to log in
Program to scan folders and warn about missing file(s)?
There are 50 folders in which a file gets into once an hour, 12 such files are typed in a day. Is it possible to write a program that can check files in folders, and if there is no fresh file, send a warning to the responsible user via, for example, Telegram.
Answer the question
In order to leave comments, you need to log in
Yes, it's possible. Take any scripting language and write a script of several lines.
var fso = new ActiveXObject("Scripting.FileSystemObject")
while(true) {
tryBackup(filePath + fileName1, filePath + fileName2)
if (!fso.FileExists(filePath + fileName1)) {
tryRecover()
}
WScript.Sleep(30000)
}
Here's a trashy VBScript example under WSH that checks every 30 seconds for a file and makes a backup. Yes. You can write a script based on the same find ./ -type f -cmin 60 -exec {}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question