gwclientid.bat
Generated on Tue Dec 05 17:44:02 Eastern Standard Time 2006 from gwclientid.bat
@echo off
TITLE GWCLIENTID: Get GroupWise Client version numbers from GW POA HTTP Monitor pages
echo.
echo Program : GWCLIENTID.BAT
echo Purpose : Get GroupWise Client version numbers from GW POA HTTP Monitor pages
echo Date : 25 September 2003
echo Author : Bob Jonkman
echo.
goto begin
Parameters : %1 = date in yyyy-mm-dd format
Modified : 2004-10-04 - Added parameter for date
: 2004-12-13 - Added HTTrack Web Page Copier (from http://www.httrack.com/)
: 2005-07-14 - Separated table generation into GWCLIENTID-CURRENT.BAT and OLDCLIENTS.BAT
: 2005-10-17 - Added 'gwclientid.html'
: 2006-03-03 - Added Remote Client listing from rconn
:begin
if not exist "C:\Program Files\WinHTTrack\httrack.exe" goto no-httrack
if "%1" == "" goto makedate
set filename=GWCLIENTID-%1
goto create
:makedate
rem !!! Make sure that the Regional Settings Short Date format can be used in file names (ie. no slashes)!!
set filename=GWCLIENTID-%date%
:create
echo Retrieve HTML files with HTTRACK
rem Options: use urls in List; list; no robots.txt; Get files without parsing
"c:\program files\winhttrack\httrack.exe" -%%L gwclientid-list.txt -s0 -g
echo Create '%FILENAME%.csv' from HTML files...
gawk -f gwclientid.awk -f library.awk conn*.html rconn*.html > %FILENAME%.csv
rem For debugging...
pause
echo Delete retrieved HTML files
del conn*.html
del conn*.readme
del rconn*.html
del rconn*.readme
echo Create current frequency and cross-tab files
call gwclientid-current.bat %FILENAME%.csv
echo Create list and tables of old clients
call oldclients.bat %FILENAME%.csv
echo Copy '%FILENAME%.csv' to Messaging folder
copy %FILENAME%.csv "G:\projects\GW6.5\GW6.5 Client Config and Rollout\GW Client Version\"
echo Copy '%FILENAME%.csv' to 'gwclientid.csv'
copy %FILENAME%.csv gwclientid.csv
echo Create 'gwclientid.html' from 'gwclientid.csv'...
gawk -f csv2html.awk -f library.awk -v LINK=1 -v TITLE="GW Clients logged in at %date% %time%" gwclientid.csv > gwclientid.html
echo Copy 'gwclientid.csv' to Web server...
copy gwclientid.csv \\cotgw506\sys\apache2\htdocs\stats\
echo Copy 'gwclientid.html' to Web server...
copy gwclientid.html \\cotgw506\sys\apache2\htdocs\stats\
echo GWCLIENTID is done with %FILENAME%.csv
set filename=
goto end
:no-httrack
echo Error: Can't find "C:\Program Files\WinHTTrack\httrack.exe"; see http://www.httrack.com
pause
:end
rem EOF: GWCLIENTID.BAT
1 files processed.