@ECHO OFF
REM Dataforth Test Machine Startup - DOS 6.22
REM Version: 4.0 - No IF EXIST checks
REM Last modified: 2026-03-12

REM Set machine identity (configured by DEPLOY.BAT)
SET MACHINE=TS-4R

REM Set DOS search path for executables
SET PATH=C:\DOS;C:\NET;C:\BAT;C:\BATCH;C:\

REM Set command prompt to show current directory
PROMPT $P$G

REM Set temporary file directory
SET TEMP=C:\TEMP
SET TMP=C:\TEMP

CLS
ECHO.
ECHO ==============================================================
ECHO   Dataforth Test Machine: %MACHINE%
ECHO   AUTOEXEC v4.0 - 2026-03-12
ECHO ==============================================================
ECHO.

REM Create required directories
MD C:\TEMP
MD C:\BAT
MD C:\BATCH

ECHO Starting network client...
ECHO.

REM Start network client and map T: and X: drives
CALL C:\STARTNET.BAT

ECHO.
ECHO Network Drives:
ECHO   T: = \\D2TESTNAS\test
ECHO   X: = \\D2TESTNAS\datasheets
ECHO.

REM Download latest software updates from network
ECHO Checking for software updates...
CALL C:\BAT\NWTOC.BAT

REM Upload test data to network for database import
ECHO Uploading test data to network...
CALL C:\BAT\CTONW.BAT

ECHO.
ECHO ==============================================================
ECHO System Ready
ECHO ==============================================================
ECHO.
ECHO Available Commands:
ECHO   UPDATE   - Full system backup to T:\%MACHINE%\BACKUP
ECHO   CHECKUPD - Check for available updates
ECHO   CTONW    - Manual upload to network
ECHO   NWTOC    - Manual download from network
ECHO.

:END
