How to use mIRCStats automatic update
=====================================
by Mikko Auvinen 29.6.1999

EXTRACT ZIP FILE TO "autoupdate" SUBDIR UNDER YOUR MIRCSTATS DIRECTORY!



Autoupdate is just a simple dos batch file (autoupd.bat) which:

* Deletes old stats file
* Runs mircstats.exe to create a new stats file
* Waits until new stats are ready
* Uploads stats to remote web server using dos ftp with ftp script file


There's also another batch file (autoupd2.bat) which
in addition first downloads log file from remote server.
(for non-mIRC users..)



All you need to do is:

* Change file names in the beginning of autoupd.bat 
  (right click and EDIT to open it)

* Open ftp script file(s) (ftpup.txt / ftpdown.txt) with notepad and change:
  - server name to one you are using as your web server (1. line)
  - username (2. line)
  - password (3. line)
  - remote directory of html or log(5.line)
  - local directory of html or log(6. line)
  - your stats/log file name (7. line)


Test it at this point by running autoupd.bat
(If you are getting environmental errors check note in the end of this file..)


* There's several ways you can run autoupd.bat automatically:
  - Windows scheduler programs (task scheduler, system agent, at(NT))
  
  - mIRC has also built-in timer which can be used..
  	
	for example to run stats every 24 hours use:
 
 	/timerstats 30 86400 /run c:\mircstats\autoupdate\autoupd.bat

  	(this can be placed to FILE/OPTIONS/PERFORM to start timer when you run mIRC)


  - Also many other scheduler programs are available..



Because of waiting loop which uses very lousy sleep.exe program
your computer might slow down significantly during stats update.

That's why I recommend you to schedule it to be done times when you
are not using your machine..



** To close window when autoupdate is finished, create a shortcut to windows desktop
   and check "Close on exit"! Easy.  (thanks to Chuq for informing me this one!)



Known bugs: (please mail to ave@cc.tut.fi it you have fixes!)

* Sleep loop is not very optimal. Mail if you have a better solution.



-----
If you are getting environment errors, read this:


NOTE (from http://ocean.ucc.ie/99/callanan/batch.htm):


To prevent out-of-environment errors when running batch files 
you should also have a SHELL statement in CONFIG.SYS to specify 
a larger-than-normal environment, something like: 

	shell=c:\command.com /e:1024 /p

Some computers have COMMAND.COM only in the DOS directory, 
if there is no COMMAND.COM in the root change 'c:\command.com' 
to 'c:\dos\command.com' or wherever it is. 

If a 'set comspec=c:\command.com' line is present it should 
match the path\filename given in the shell command. 
