@echo off

REM Do NOT erase this file.  It is necessary for updating TMG.

: anyheader
if exist header.* goto headera
goto headersok

: headera
if exist header.a goto headerb
echo Cannot find contents of TMGW34A.ZIP.
echo Please download or unzip that file before proceeding.
goto exit
: headerb
if exist header.b goto headerc
echo Cannot find contents of TMGW34B.ZIP.
echo Please download or unzip that file before proceeding.
goto exit
: headerc
if exist header.c goto headerd
echo Cannot find contents of TMGW34C.ZIP.
echo Please download or unzip that file before proceeding.
goto exit
: headerd
if exist header.d goto headersok
echo Cannot find contents of TMGW34D.ZIP.
echo Please download or unzip that file before proceeding.
goto exit

: headersok
if not exist timeline\*.*  md timeline > nul
cls
rem This utility patches TMG ...

echo Patching TMG ...
if exist pdialog.exe      erase pdialog.exe > nul
if not exist rrw\*.*      md rrw > nul
if exist wpspawn.exe      copy wpspawn.exe wordproc > nul
if exist wpspawn.exe      erase wpspawn.exe > nul
if exist rr*.*            copy rr*.* rrw > nul
if exist rr*.*            erase rr*.* > nul
if not exist toolbar\*.*  md toolbar > nul
if exist apps\txtload.app erase apps\txtload.app > nul
if exist toolbar.dbf      copy toolbar.dbf toolbar > nul
if exist toolbar.dbf      erase toolbar.dbf  > nul
if exist toolbar.fpt      copy toolbar.fpt toolbar > nul
if exist toolbar.fpt      erase toolbar.fpt  > nul
if exist toolbar.cdx      copy toolbar.cdx toolbar > nul
if exist toolbar.cdx      erase toolbar.cdx  > nul
if exist *.BMP            copy *.BMP toolbar > nul
if exist *.BMP            erase *.BMP  > nul
if exist conv_log.txt      erase conv_log.txt
if exist wordproc\conv_log.txt erase wordproc\conv_log.txt
if exist filtop.*          copy filtop.* admin > nul
if exist filtop.*          erase filtop.*
if exist filtcol.*         copy filtcol.* admin > nul
if exist filtcol.*         erase filtcol.*
if exist fontfam.*         copy fontfam.* admin > nul
if exist fontfam.*         erase fontfam.*
if exist wx.cf             copy wx.cf wordproc > nul
if exist wx.cf             erase wx.cf
if exist wx.dta            copy wx.dta wordproc > nul
if exist wx.dta            erase wx.dta
if exist nolog.wpt         copy nolog.wpt wordproc > nul
if exist nolog.wpt         erase nolog.wpt
if exist rrconfig.dbf      copy rrconfig.dbf rrw > nul
if exist rrconfig.dbf      erase rrconfig.dbf
if exist rrrtfx.dll        copy rrrtfx.dll rrw > nul
if exist rrrtfx.dll        erase rrrtfx.dll
if exist owpf5.dll         copy owpf5.dll wordproc > nul
if exist owpf5.dll         erase owpf5.dll
if exist owpf6.dll         copy owpf6.dll wordproc > nul
if exist owpf6.dll         erase owpf6.dll
if exist omsww6.dll        copy omsww6.dll wordproc > nul
if exist omsww6.dll        erase omsww6.dll
if exist defsureof.fxp     erase defsureof.fxp
if exist $*.*              erase $*.* > nul
if exist apps\$*.*         erase apps\$*.* > nul
if exist libs\$*.*         erase libs\$*.* > nul
if exist admin\$*.*        erase admin\$*.* > nul
if exist rrw\*.wup         erase rrw\*.wup
if exist rrw\$*.*          erase rrw\$*.*
if exist updatew.exe       erase updatew.exe > nul
if exist apps\exhibitw.app erase apps\exhibitw.app > nul
if exist apps\rlog.app     erase apps\rlog.app > nul
if exist apps\gedcom.app     erase apps\gedcom.app > nul
if exist apps\updatew.app     erase apps\updatew.app > nul
if exist apps\toolsw.app     erase apps\toolsw.app > nul
if exist gedcom.exe        erase gedcom.exe > nul
if exist gedcomw.exe       erase gedcomw.exe > nul
if exist rrw\rrrplet.rp5   erase rrw\rrrplet.rp5
if exist rrw\rrrllet.rp5   erase rrw\rrrllet.rp5
if exist rrw\rrrpleg.rp5   erase rrw\rrrpleg.rp5
if exist rrw\rrrlleg.rp5   erase rrw\rrrlleg.rp5
if exist rrw\rrrpa4.rp5    erase rrw\rrrpa4.rp5
if exist rrw\rrrla4.rp5    erase rrw\rrrla4.rp5
if exist rrw\plet050.rp5   erase rrw\plet050.rp5
if exist rrw\llet050.rp5   erase rrw\llet050.rp5
if exist rrw\pleg050.rp5   erase rrw\pleg050.rp5
if exist rrw\lleg050.rp5   erase rrw\lleg050.rp5
if exist rrw\pa4050.rp5    erase rrw\pa4050.rp5
if exist rrw\la4050.rp5    erase rrw\la4050.rp5

echo ÿ

: testprg
if exist TMGMAIN.EXE goto apps
if exist TMGMAINW.EXE goto apps
echo TMG program files not found.
echo ÿ
echo This patch MUST be applied to an existing TMG
echo program directory.
echo ÿ
echo You *will* be given an opportunity to backup your data
echo before it is affected by this update.
echo
echo If you continue to have trouble, contact tech support
echo at 410-796-2447.
goto end

: apps
if not exist *.app goto rrwdir
echo Copying APP files...
if not exist apps\*.app md APPS > nul
copy *.app apps  > nul
erase *.app > nul
echo Completed.

: rrwdir
if not exist rrw\*.* md RRW > nul

: rp5
if not exist *.rp5 goto libs
echo Copying print modules...
if not exist rrw\*.* md rrw > nul
copy *.rp5 rrw  > nul
erase *.rp5 > nul
echo Completed.

: libs
if not exist *.FLL goto wbtr
echo Copying LIB files...
if not exist libs\*.fll md LIBS > nul
copy *.fll libs  > nul
erase *.fll > nul
echo Completed.

: wbtr
if not exist WBTRCALL.DLL goto frload
echo Copying WBTRCALL.DLL files...
if not exist libs\*.fll md LIBS > nul
copy WBTRCALL.DLL libs  > nul
erase WBTRCALL.DLL > nul
echo Completed.

: frload
if not exist FRLOAD.DLL goto ftwload
echo Copying FRLOAD.DLL files...
if not exist libs\*.fll md LIBS > nul
copy FRLOAD.DLL libs  > nul
erase FRLOAD.DLL > nul
echo Completed.

: ftwload
if not exist FTWLOAD.DLL goto cnfs
echo Copying FTWLOAD.DLL files...
if not exist libs\*.fll md LIBS > nul
copy FTWLOAD.DLL libs  > nul
erase FTWLOAD.DLL > nul
echo Completed.

: cnfs
if not exist *.CNF goto wordproc
echo Copying CNF files...
if not exist wordproc\*.dll md wordproc > nul
copy *.cnf wordproc  > nul
erase *.cnf > nul
echo Completed.

: wordproc
if not exist WP_CONV.DLL goto wordmeter
echo Copying WORDPROC files...
if not exist wordproc\*.dll md WORDPROC > nul
copy i*.dll wordproc  > nul
copy o*.dll wordproc  > nul
copy wp_conv.dll wordproc  > nul
copy *.cf wordproc  > nul
copy *.cnf wordproc  > nul
copy wx.dta wordproc  > nul
copy detfile.dll wordproc  > nul
copy meter.dll wordproc  > nul
erase i*.dll > nul
erase o*.dll > nul
erase wp_conv.dll > nul
erase *.cf > nul
erase *.cnf > nul
erase wx.dta > nul
erase detfile.dll > nul
erase meter.dll > nul
echo Completed.

: wordmeter
if not exist METER.DLL goto espiaw
echo Copying METER.DLL.EXE...
if not exist wordproc\*.dll md WORDPROC > nul
if exist wordproc\meter.dll erase wordproc\meter.dll > nul
copy meter.dll wordproc  > nul
erase meter.dll > nul
echo Completed.

: espiaw
if not exist libs\ESPIAW.EXE goto espdll
echo Copying ESPIAW.EXE...
copy libs\ESPIAW.EXE .  > nul
erase libs\ESPIAW.EXE > nul
echo Completed.

: espdll
if not exist libs\ESPROT16.DLL goto libsdos
echo Copying ESPROT16.DLL...
copy libs\ESPROT16.DLL .  > nul
erase libs\ESPROT16.DLL > nul
echo Completed.

: libsdos
if not exist *.PLB goto admin
if not exist libs\*.plb md LIBS > nul
copy *.plb libs  > nul
erase *.plb > nul
echo Completed.

: admin
if not exist filt*.* goto admin2
if not exist admin\filt*.* md ADMIN > nul
echo Copying ADMIN files ...
copy filt*.* admin  > nul
erase filt*.*
echo Completed.

: admin2
if not exist font*.* goto testwup
if not exist admin\font*.* md ADMIN > nul
echo Copying ADMIN files ...
copy font*.* admin  > nul
erase font*.*
echo Completed.

: testwup
if exist *.wup goto testwsp
echo ÿ
echo No patch files found.  Nothing to patch.
echo ÿ
echo If you are having trouble, please contact Wholly Genes
echo Technical Support at 410-796-2447 (or tmg@whollygenes.com).
echo ÿ
goto end

: testwsp
if exist wsp.com goto patchit
echo ÿ
echo Cannot find patch utility WSP.COM.
echo Please reinstall from original TMG installation disks.
echo ÿ
echo If you continue to have trouble, contact Wholly Genes
echo Technical Support at 410-796-2447 (or tmg@whollygenes.com).
echo ÿ
goto end

: patchit
cls
echo Ready to apply patch files.
echo Answer "Y" to any questions about overwriting files.
pause

: foxw2600
if not exist foxw2600.wup goto tmgmainw
wsp foxw2600.wup
erase foxw2600.wup > nul

: tmgmainw
if not exist tmgmainw.wup goto repair
wsp tmgmainw.wup
erase tmgmainw.wup > nul

: repair
if not exist repair.wup goto wupdate
wsp repair.wup
erase repair.wup > nul

: wupdate
if not exist wupdate.wup goto screen06
cd apps
..\wsp ..\wupdate.wup
cd ..
erase wupdate.wup > nul

: screen06
if not exist screen06.wup goto screen08
cd apps
..\wsp ..\screen06.wup
cd ..
erase screen06.wup > nul

: screen08
if not exist screen08.wup goto screen10
cd apps
..\wsp ..\screen08.wup
cd ..
erase screen08.wup > nul

: screen10
if not exist screen10.wup goto tmgmain
cd apps
..\wsp ..\screen10.wup
cd ..
erase screen10.wup > nul

: tmgmain
if not exist tmgmain.wup goto tools
wsp tmgmain.wup
erase tmgmain.wup > nul

: tools
if not exist tools.wup goto wtools
cd apps
..\wsp ..\tools.wup
cd ..
erase tools.wup > nul

: wtools
if not exist wtools.wup goto geobase
cd apps
..\wsp ..\wtools.wup
cd ..
erase wtools.wup > nul

: geobase
if not exist geobase.wup goto gedcom
cd apps
..\wsp ..\geobase.wup
cd ..
erase geobase.wup > nul

: gedcom
if not exist gedload.wup goto r5load
cd apps
..\wsp ..\gedload.wup
cd ..
erase gedload.wup > nul

: r5load
if not exist r5load.wup goto foload
cd apps
..\wsp ..\r5load.wup
cd ..
erase r5load.wup > nul

: foload
if not exist foload.wup goto eftload
cd apps
..\wsp ..\foload.wup
cd ..
erase foload.wup > nul

: eftload
if not exist eftload.wup goto pafload
cd apps
..\wsp ..\eftload.wup
cd ..
erase eftload.wup > nul

: pafload
if not exist pafload.wup goto edbload
cd apps
..\wsp ..\pafload.wup
cd ..
erase pafload.wup > nul

: edbload
if not exist edbload.wup goto bkload
cd apps
..\wsp ..\edbload.wup
cd ..
erase edbload.wup > nul

: bkload
if not exist bkload.wup goto txtload
cd apps
..\wsp ..\bkload.wup
cd ..
erase bkload.wup > nul

: txtload
if not exist txtload.wup goto wmkged
cd apps
..\wsp ..\txtload.wup
cd ..
erase txtload.wup > nul

: wmkged
if not exist wmkged.wup goto wmkgen
cd apps
..\wsp ..\wmkged.wup
cd ..
erase wmkged.wup > nul

: wmkgen
if not exist wmkgen.wup goto wmkinarr
cd apps
..\wsp ..\wmkgen.wup
cd ..
erase wmkgen.wup > nul

: wmkinarr
if not exist wmkinarr.wup goto wmkdescn
cd apps
..\wsp ..\wmkinarr.wup
cd ..
erase wmkinarr.wup > nul

: wmkdescn
if not exist wmkdescn.wup goto wmkahnen
cd apps
..\wsp ..\wmkdescn.wup
cd ..
erase wmkdescn.wup > nul

: wmkahnen
if not exist wmkahnen.wup goto wmkaudit
cd apps
..\wsp ..\wmkahnen.wup
cd ..
erase wmkahnen.wup > nul

: wmkaudit
if not exist wmkaudit.wup goto wmkdesc
cd apps
..\wsp ..\wmkaudit.wup
cd ..
erase wmkaudit.wup > nul

: wmkdesc
if not exist wmkdesc.wup goto wmkfgs
cd apps
..\wsp ..\wmkdesc.wup
cd ..
erase wmkdesc.wup > nul

: wmkfgs
if not exist wmkfgs.wup goto wmkidet
cd apps
..\wsp ..\wmkfgs.wup
cd ..
erase wmkfgs.wup > nul

: wmkidet
if not exist wmkidet.wup goto wmklorep
cd apps
..\wsp ..\wmkidet.wup
cd ..
erase wmkidet.wup > nul

: wmklorep
if not exist wmklorep.wup goto wmkcped
cd apps
..\wsp ..\wmklorep.wup
cd ..
erase wmklorep.wup > nul

: wmkcped
if not exist wmkcped.wup goto wmkped
cd apps
..\wsp ..\wmkcped.wup
cd ..
erase wmkcped.wup > nul

: wmkped
if not exist wmkped.wup goto wzreport
cd apps
..\wsp ..\wmkped.wup
cd ..
erase wmkped.wup > nul

: wzreport
if not exist wzreport.wup goto wmkend
cd apps
..\wsp ..\wzreport.wup
cd ..
erase wzreport.wup > nul

: wmkend
if not exist wmkend.wup goto wmkbib
cd apps
..\wsp ..\wmkend.wup
cd ..
erase wmkend.wup > nul

: wmkbib
if not exist wmkbib.wup goto wmkkin
cd apps
..\wsp ..\wmkbib.wup
cd ..
erase wmkbib.wup > nul

: wmkkin
if not exist wmkkin.wup goto wmkinfo
cd apps
..\wsp ..\wmkkin.wup
cd ..
erase wmkkin.wup > nul

: wmkinfo
if not exist wmkinfo.wup goto wmkstat
cd apps
..\wsp ..\wmkinfo.wup
cd ..
erase wmkinfo.wup > nul

: wmkstat
if not exist wmkstat.wup goto crw
cd apps
..\wsp ..\wmkstat.wup
cd ..
erase wmkstat.wup > nul

: crw
if not exist wcrw.wup goto espiawi
cd apps
..\wsp ..\wcrw.wup
cd ..
erase wcrw.wup > nul

: espiawi
if not exist espia_i.wup goto espiawexe
cd libs
..\wsp ..\espia_i.wup
cd ..
erase espia_i.wup > nul

: espiawexe
if not exist espiaw.wup goto espbdll
wsp espiaw.wup
erase espiaw.wup > nul

: espbdll
if not exist espbrt16.wup goto esprdll
wsp espbrt16.wup
erase espbrt16.wup > nul

: esprdll
if not exist esprot16.wup goto foxsqzfll
wsp esprot16.wup
erase esprot16.wup > nul

: foxsqzfll
if not exist foxsqz.wup goto phdbase
cd libs
..\wsp ..\foxsqz.wup
cd ..
erase foxsqz.wup > nul

: phdbase
if not exist phdbase.wup goto tmghelp
cd libs
..\wsp ..\phdbase.wup
cd ..
erase phdbase.wup > nul

: tmghelp
if not exist tmghelp.wup goto tmgxrefw
wsp tmghelp.wup
erase tmghelp.wup > nul

: tmgxrefw
if not exist tmgxrefw.wup goto inscr
wsp tmgxrefw.wup
erase tmgxrefw.wup > nul

: inscr
if not exist inscr.cnf goto odlls
if exist wordproc\inscr.cnf erase wordproc\inscr.cnf > nul
copy inscr.cnf wordproc\inscr.cnf >nul
erase inscr.cnd > nul

: odlls
if not exist wordproc\*.DLL goto donemsg

: iinsc
if not exist IINSC.WUP goto meter
cd wordproc
..\wsp ..\iinsc.wup
cd ..
erase iinsc.wup > nul

: meter
if not exist METER.WUP goto detfile
cd wordproc
..\wsp ..\meter.wup
cd ..
erase meter.wup > nul

: detfile
if not exist DETFILE.WUP goto wpconvdll
cd wordproc
..\wsp ..\detfile.wup
cd ..
erase detfile.wup > nul

: wpconvdll
if not exist WP_CONV.WUP goto oascd
cd wordproc
..\wsp ..\wp_conv.wup
cd ..
erase wp_conv.wup > nul

: oascd
if not exist OASCD.WUP goto oascl
cd wordproc
..\wsp ..\oascd.wup
cd ..
erase oascd.wup > nul

: oascl
if not exist OASCL.WUP goto omswkd
cd wordproc
..\wsp ..\oascl.wup
cd ..
erase oascl.wup > nul

: omswkd
if not exist OMSWKD.WUP goto omswd
cd wordproc
..\wsp ..\omswkd.wup
cd ..
erase omswkd.wup > nul

: omswd
if not exist OMSWD.WUP goto oami
cd wordproc
..\wsp ..\omswd.wup
cd ..
erase omswd.wup > nul

: oami
if not exist OAMI.WUP goto odsw
cd wordproc
..\wsp ..\oami.wup
cd ..
erase oami.wup > nul

: odsw
if not exist ODSW.WUP goto oenab
cd wordproc
..\wsp ..\odsw.wup
cd ..
erase odsw.wup > nul

: oenab
if not exist OENAB.WUP goto ohtml
cd wordproc
..\wsp ..\oenab.wup
cd ..
erase oenab.wup > nul

: ohtml
if not exist OHTML.WUP goto oinsc
cd wordproc
..\wsp ..\ohtml.wup
cd ..
erase ohtml.wup > nul

: oinsc
if not exist OINSC.WUP goto olm
cd wordproc
if exist $insc.dll erase $insc.dll > nul
..\wsp ..\oinsc.wup
cd ..
erase oinsc.wup > nul

: olm
if not exist OLM.WUP goto omass11
cd wordproc
..\wsp ..\olm.wup
cd ..
erase olm.wup > nul

: omass11
if not exist OMASS11.WUP goto omsww2
cd wordproc
..\wsp ..\omass11.wup
cd ..
erase omass11.wup > nul

: omsww2
if not exist OMSWW2.WUP goto omsww6
cd wordproc
..\wsp ..\omsww2.wup
cd ..
erase omsww2.wup > nul

: omsww6
if not exist OMSWW6.WUP goto owpf5
cd wordproc
..\wsp ..\omsww6.wup
cd ..
erase omsww6.wup > nul

: owpf5
if not exist OWPF5.WUP goto owpf6
cd wordproc
..\wsp ..\owpf5.wup
cd ..
erase owpf5.wup > nul

: owpf6
if not exist OWPF6.WUP goto ows2
cd wordproc
..\wsp ..\owpf6.wup
cd ..
erase owpf6.wup > nul

: ows2
if not exist OWS2.WUP goto ows34
cd wordproc
..\wsp ..\ows2.wup
cd ..
erase ows2.wup > nul

: ows34
if not exist OWS34.WUP goto ows57
cd wordproc
..\wsp ..\ows34.wup
cd ..
erase ows34.wup > nul

: ows57
if not exist OWS57.WUP goto oxy
cd wordproc
..\wsp ..\ows57.wup
cd ..
erase ows57.wup > nul

: oxy
if not exist OXY.WUP goto RRWRUN
cd wordproc
..\wsp ..\oxy.wup
cd ..
erase oxy.wup > nul

: RRWRUN
if not exist RRWRUN.WUP goto RRWRENG
cd RRW
..\wsp ..\RRWRUN.WUP
cd ..
erase RRWRUN.WUP > nul

: RRWRENG
if not exist RRWRENG.WUP goto RRWPD
cd RRW
..\wsp ..\RRWRENG.WUP
cd ..
erase RRWRENG.WUP > nul

: RRWPD
if not exist RRWPD.WUP goto RRCTL
cd RRW
..\wsp ..\RRWPD.WUP
cd ..
erase RRWPD.WUP > nul

: RRCTL
if not exist RRCTL.WUP goto RRCONFIG
cd RRW
..\wsp ..\RRCTL.WUP
cd ..
erase RRCTL.WUP > nul

: RRCONFIG
if not exist RRCONFIG.WUP goto RRW
cd RRW
..\wsp ..\RRCONFIG.WUP
cd ..
erase RRCONFIG.WUP > nul

: RRW
if not exist RRW.WUP goto RRRPLET
cd RRW
..\wsp ..\RRW.WUP
cd ..
erase RRW.WUP > nul

: RRRPLET
if not exist PLET7550.WUP goto RRRLLET
cd RRW
..\wsp ..\PLET7550.WUP
cd ..
erase PLET7550.WUP > nul
erase RRW\$*.* > nul

: RRRLLET
if not exist LLET7550.WUP goto RRRPLEG
cd RRW
..\wsp ..\LLET7550.WUP
cd ..
erase LLET7550.WUP > nul
erase RRW\$*.* > nul

: RRRPLEG
if not exist PLEG7550.WUP goto RRRLLEG
cd RRW
..\wsp ..\PLEG7550.WUP
cd ..
erase PLEG7550.WUP > nul
erase RRW\$*.* > nul

: RRRLLEG
if not exist LLEG7550.WUP goto RRRPA4
cd RRW
..\wsp ..\LLEG7550.WUP
cd ..
erase LLEG7550.WUP > nul
erase RRW\$*.* > nul

: RRRPA4
if not exist PA4_7550.WUP goto RRRLA4
cd RRW
..\wsp ..\PA4_7550.WUP
cd ..
erase PA4_7550.WUP > nul
erase RRW\$*.* > nul

: RRRLA4
if not exist LA4_7550.WUP goto donemsg
cd RRW
..\wsp ..\LA4_7550.WUP
cd ..
erase LA4_7550.WUP > nul
erase RRW\$*.* > nul

: R50PLET
if not exist PLET5050.WUP goto R50LLET
cd RRW
..\wsp ..\PLET5050.WUP
cd ..
erase PLET5050.WUP > nul
erase RRW\$*.* > nul

: R50LLET
if not exist LLET5050.WUP goto R50PLEG
cd RRW
..\wsp ..\LLET5050.WUP
cd ..
erase LLET5050.WUP > nul
erase RRW\$*.* > nul

: R50PLEG
if not exist PLEG5050.WUP goto R50LLEG
cd RRW
..\wsp ..\PLEG5050.WUP
cd ..
erase PLEG5050.WUP > nul
erase RRW\$*.* > nul

: R50LLEG
if not exist LLEG5050.WUP goto R50PA4
cd RRW
..\wsp ..\LLEG5050.WUP
cd ..
erase LLEG5050.WUP > nul
erase RRW\$*.* > nul

: R50PA4
if not exist PA4_5050.WUP goto R50LA4
cd RRW
..\wsp ..\PA4_5050.WUP
cd ..
erase PA4_5050.WUP > nul
erase RRW\$*.* > nul

: R50LA4
if not exist LA4_5050.WUP goto donemsg
cd RRW
..\wsp ..\LA4_5050.WUP
cd ..
erase LA4_5050.WUP > nul
erase RRW\$*.* > nul

: donemsg
echo ÿ
echo ******************************************************************
echo Patch process complete.
echo When you next run TMG, you should find that the initial update
echo screen reflects the new version number.
echo ÿ
echo If you received any beeping messages (e.g., "Incorrect version or
echo file retouched") while applying this patch then you are trying to
echo apply it to an inappropriate or incomplete version of TMG.
echo Make sure that you have performed a complete (i.e., not custom)
echo installation from original media and that you have applied any
echo previous patches/updates *first*.
echo ******************************************************************

: end
if exist $*.*           erase $*.* > nul
if exist apps\$*.*      erase apps\$*.* > nul
if exist libs\$*.*      erase libs\$*.* > nul
if exist admin\$*.*     erase admin\$*.* > nul
if exist wordproc\$*.*  erase wordproc\$*.* > nul
if exist rrw\$*.*       erase rrw\$*.* > nul
if exist header.*       erase header.*

echo ÿ
pause

if not exist *.wup goto exit
cls
echo ÿ
echo WARNING!: Some base files were not found!
echo The following patch files (*.WUP) were NOT APPLIED!
dir *.wup
echo ÿ
pause

:exit
