Batch file to check when txt file is modified

Microsoft Windows xp professional w/sp2
February 17, 2010 at 08:23:45
Specs: Win XP
We have a txt file that tells the current tally of a something. It is a number. I would like to have a batch file I can schedule to check at scheduled intervals to see when it is changed (file is modified) and then send a smtp mail to notify.

See More: Batch file to check when txt file is modified

Report •


#1
February 17, 2010 at 09:01:00
maybe based on something like:
fc tally prev
goto :%errorlevel%
:1
copy /y tally prev
smtp
:0
:: files same

to do email from cmdline requires other software
(gmail, netcat, etc.) so contents of smtp depends.


Report •

#2
February 17, 2010 at 12:47:46
The smtp part is pretty easy. Try this.. and it should get you what ya' need:

http://www.jeffkastner.com/2010/01/...

Instead of creating a reminder though, just use Windows 'Scheduled Tasks' and have it run your batch file on any schedule you designate.


Report •

Related Solutions


Ask Question