| Newsgroups |
gmane.mail.blat |
| Organization |
Willms-EDV - Lüko Willms |
| Message-ID |
<[email protected]> |
Guten Tag 'Skand Bhargava' [email protected] [blat],
am Donnerstag, 30. November 2017 um 11:02 schrieben Sie:
You can also think of a VB script with "sleep" in a loop. Start it minimised or as service at computer startup.
CONST guckhierName "C:\whatchthisfolder"
DIM fso, shellO , guckhier ' objects
DIM anfangstag
set fso = CreateObject("Scripting.FileSystemObject")
Set shellO = WScript.CreateObject("WScript.Shell")
anfangstag = Date
set guckhier = fso.getfolder(guckhierName)
DO WHILE anfangstag <= Date
WScript.Sleep 150000 ' millisekunden = 5 Minuten
IF fso.fileExists (guckhierName & "\" & "gesuchteDatei.txt") THEN
shello.run ("irgendeinwichtigesprogramm.exe")
wscript.sleep 1000 ' wait a second
fso.DeleteFile (guckhierName & "\" & "gesuchteDatei.txt") ' so that it is being started only once
END IF
LOOP
===========================================
This script should run until midnight and check for the file named "gesuchteDatei.txt" every five minutes.
Caveat: I have not tested it neither tried to compile it.
Have fun!
--
Mit freundlichen Grüßen
Lüko Willms
mailto:[email protected]