Thanks for your feedback leew
I'm trying to understand and test it on my laptop before I put it on production server.
When I open a command prompt and type
C:\>copy con c:\n.txt[enter/return]
I get the following error:
The syntax of the command is incorrect.
What am I doing wrong ?
Thanks again for your prompt reply
Regards,
Smary
Main Topics
Browse All Topics





by: leewPosted on 2009-10-19 at 10:46:32ID: 25607318
I would suggest using the Windows Task Scheduler to run a batch file periodically (every 5 minutes - or every hour - or whatever interval you'd like)
/solutions /cmdlinema il/ cmdline mail.htm
Some notes on the attached script -
bmail is a command line mailer available from here - follow the syntax to have it email who and what you want.
http://www.beyondlogic.org
In addition, you will need to create a text file, "n.txt" using the following procedure (this is vital or compare will prompt you and not move on)
from the Windows command prompt, type the following sequence (keystrokes in brackets - [])
copy con c:\n.txt[enter/return]
N[enter/return]
[F6]
This should create a file with "N" and a carriage return as the value.
The way the script works -
Creates a file "current.txt" which is a listing of the contents of the FTP site.
Next time the script is run, it renames current.txt to old, creates a new current.txt and compares the two. If the old one and the new one are different, compare sets the errorlevel to 1 (something other than zero). Then we check the value of errorlevel - if it's not zero, we run the e-mail command.
Select allOpen in new window