Fix DOS batch files: remove IF EXIST checks causing failures

DOS 6.22 IF EXIST with wildcards on SMB1 network paths causes
"Bad command" and "Too many parameters" errors. Rewrote CTONW,
NWTOC, and AUTOEXEC to v4.0 with direct COPY/MD commands.
Pre-created all station LOGS directories on new D2TESTNAS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 19:23:23 -07:00
parent 000ee3da5c
commit 78528d545e
4 changed files with 86 additions and 137 deletions

View File

@@ -1,8 +1,7 @@
@ECHO OFF
REM Dataforth Test Machine Startup - DOS 6.22
REM Automatically runs after CONFIG.SYS during boot
REM Version: 3.0 - Auto-update system integrated
REM Last modified: 2026-01-19
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
@@ -21,25 +20,21 @@ CLS
ECHO.
ECHO ==============================================================
ECHO Dataforth Test Machine: %MACHINE%
ECHO DOS 6.22 with Automatic Update System
ECHO AUTOEXEC v4.0 - 2026-03-12
ECHO ==============================================================
ECHO.
REM Create required directories if they don't exist
IF NOT EXIST C:\TEMP\*.* MD C:\TEMP
IF NOT EXIST C:\BAT\*.* MD C:\BAT
IF NOT EXIST C:\BATCH\*.* MD C:\BATCH
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
IF EXIST C:\STARTNET.BAT CALL C:\STARTNET.BAT
CALL C:\STARTNET.BAT
REM Verify T: drive is accessible
IF NOT EXIST T:\*.* GOTO NET_FAILED
ECHO (OK) Network started
ECHO.
ECHO Network Drives:
ECHO T: = \\D2TESTNAS\test
@@ -48,11 +43,11 @@ ECHO.
REM Download latest software updates from network
ECHO Checking for software updates...
IF EXIST C:\BAT\NWTOC.BAT CALL C:\BAT\NWTOC.BAT
CALL C:\BAT\NWTOC.BAT
REM Upload test data to network for database import
ECHO Uploading test data to network...
IF EXIST C:\BAT\CTONW.BAT CALL C:\BAT\CTONW.BAT
CALL C:\BAT\CTONW.BAT
ECHO.
ECHO ==============================================================
@@ -65,17 +60,5 @@ ECHO CHECKUPD - Check for available updates
ECHO CTONW - Manual upload to network
ECHO NWTOC - Manual download from network
ECHO.
GOTO END
:NET_FAILED
ECHO ERROR: Network drive mapping failed
ECHO T: drive not accessible
ECHO.
ECHO To start network manually:
ECHO C:\STARTNET.BAT
ECHO.
ECHO Updates and backups will not work until network is available.
ECHO.
PAUSE
:END