: AWS.BAT : this batch file is designed to gather the data for the AWS system each day, : transmit it to Bob, archive it in ZIP files, and send it up to Farm DAYTA. : $Log: aws.bat $ :Revision 1.4 1997/04/02 22:54:53 rick :fixed some too-long comments : :Revision 1.3 1997/04/02 22:50:18 rick :added "magic incantation" for Farm DAYTA : :Revision 1.2 1997/04/02 22:42:25 rick :updated and commented per meeting with Bill today : rem *** set stn=Che Stu rem Removed 951016:Nek, Max,Cen,Ma2 rem Removed 970128:Ark, Elk, Gre, Ver rem Replaced ELK 970303 set stn=Arl Ant Che Cra Elk Han Lan Mad Mar Man Pra Spr Stu Woo Pic c: cd \aws\sys\netmngr : : "today" apparently creates env.bat, which has some env variables dealing : with today's date and time: ystryr, yr, twrwyr, ystrdy, tdy, and tmrw. : today env.bat call env : : if you want it to start the download at a particular time today, uncomment : the "timer" line below and change the time. to download right now, leave : "timer" commented and comment out "goto lastpart". rem timer %yr% %tdy% 13 46 goto lastpart :newday c: cd \aws\sys\netmngr : this is another program that writes a batch file, then calls it to set env : variables. mkenvbat call env1 : this batch file performs the calls, using TELCOM, and leaves : the DAT files in \aws\download. call c:\aws\sys\netmngr\callstn %stn% : make ZIP backups of the DAT files, in \aws\dat\yr, \aws\dat\day, and on Bob call c:\aws\sys\netmngr\arcdat %stn% c: : delete all the DAT files created yesterday in \aws\download call c:\aws\sys\netmngr\rmystrdy.bat %stn% : TelCom download errors for the day get stuck onto this file; ProComm errors : will be added to it, below copy c:\aws\download\*.err c:\aws\download\general del c:\aws\download\*.err rename c:\aws\download\general general.err copy c:\aws\download\general.err e:\xfer\general.err : copy the dat files for today onto Bob, who will use 'em & lose 'em copy \aws\download\???%JYear%%JDay%.dat e:\xfer\dat : leave the date of last download on Bob (don't know why) echo %yr%%tdy% > e:\xfer\lastdown echo set lastdown=%yr%%tdy% > e:\xfer\lastdown.bat rem ----------------- rem | the ready file is the semaphore file rem | a process on hope will process this stuff rem | as soon as it sees this file. It will rem | also remove it. echo "OK" > e:\xfer\ready : now we wait for a little bit, doing silly things, so that we'll : have reports on e:\xfer\rpt c:\aws\sys\netmngr\timer %yr% %tdy% 0 45 : upload the reports to Farm DAYTA as "send.uwi", put any errors : onto general.err. create the file by echoing the magic incantation : they gave us (Kevin, 972-3939) into a file, then concatenating the data c: cd \pcplus echo "\so:via\sn:2000\ed:10" > send.uwi echo "" >> send.uwi type e:\xfer\rpt\7dayclim.rpt >> send.uwi pcplus /ffd type c:\pcplus\proerr.txt >> e:\xfer\general.err : now set up the timer and wait until it's time to run again :lastpart c: cd \aws\sys\netmngr timer %tmrwyr% %tmrw% 0 30 today env.bat call env goto newday