@ECHO OFF
@ECHO OFF
REM ==================================================================
REM D2W.BAT
REM ==================================================================
REM =  Batch file used call DPLI?? to import the status change file  =
REM =                                                                =
REM =  You must EDIT THIS FILE for the proper directory name where   =
REM =  Dairy Comp is located.   Currently assumes C:\DC305           =
REM =                                                                =
REM ==================================================================

C:
cd\DairyPln

set dcpath=C:\DC

if exist DPList.EXE goto DPList

del DC_305.HDI
DPLink -uac %dcpath%\dCstatus.DII %dcpath%\dCstatus.ERR
DPLink -uc  %dcpath%\dPstatus.DII %dcpath%\dPstatus.DAT

goto Done

:DPList
echo w:define PSTR 2021 >DC_305.HDI
Start/W DPList /L %dcpath%\dCstatus.DII %dcpath%\dCstatus.ERR /ae
Start/Min DPList /L %dcpath%\dPstatus.DII %dcpath%\dPstatus.DAT /aer
rem start/m allows the program to go back to dc305 and dplist to run
rem in background
:Done

c:
cd %dcpath%
set dcpath=

@CLS
