REM     This batch file is used to patch the FoxPro DK for DOS files.

REM     Make files Read-Write

        ATTRIB -R FOXD2500.ESL
        ATTRIB -R FOXD2500.ESO
        ATTRIB -R FOXDX250.ESL

REM     Apply Patches

	DOSDK -O
	@IF ERRORLEVEL 1 GOTO :Error
	
	ATTRIB -r foxpro.exe
	ATTRIB -r foxprox.exe
	PATCH -P
	ATTRIB +r foxpro.exe
	ATTRIB +r foxprox.exe
	
REM     Erase old Library Files -- these will fail if it's the first time
REM     You've installed patches for the DK.

        ATTRIB -R FOXD250A.ESL
        ATTRIB -R FOXD250A.ESO
        ATTRIB -R FOXDX25A.ESL
        ERASE FOXD250A.ESL
        ERASE FOXD250A.ESO
        ERASE FOXDX25A.ESL

REM     Rename/restore files to required names

	RENAME foxd2500.esl foxd250a.esl
	RENAME foxd2500.eso foxd250a.eso
	RENAME foxdx250.esl foxdx25a.esl

	GOTO Done

:Error
	@ECHO An error occured.  You are probably out of disk space.
	@ECHO Please free up some disk space and try again.

:Done
