Major DOS 6.22 compatibility fixes for the Dataforth update system: Changes Made: - Replace COPY /Y with XCOPY /Y (COPY doesn't support /Y in DOS 6.22) - Remove all trailing backslashes from XCOPY destinations (causes "Too many parameters") - Remove %%~dpnF and %~nx1 syntax (Windows NT only, not DOS 6.22) - Remove \NUL directory existence checks (unreliable in DOS 6.22) - Simplify all batch files to minimal, reliable DOS 6.22 patterns - Use MD >NUL 2>NUL for directory creation (ignore errors) Files Updated: - NWTOC.BAT v2.7: Simplified download with XCOPY /Y - CTONW.BAT v2.4: Simplified upload with XCOPY /Y - DEPLOY.BAT v2.2: Simplified deployment with XCOPY /Y - CHECKUPD.BAT v1.3: Removed %~nx1 syntax - UPDATE-ROOT.BAT: Root redirect script - UPDATE-PRODSW.BAT v2.3: Backup utility (new file, was UPDATE.BAT in ProdSW) Why: - Previous versions caused infinite loops due to COPY /Y not existing in DOS 6.22 - Trailing backslashes on XCOPY destinations caused "Too many parameters" errors - Complex variable syntax like %%~dpnF is NT-only and breaks on DOS 6.22 - Simplified scripts are more reliable and easier to debug Testing: - Deployed to AD2 (192.168.0.6) and D2TESTNAS (192.168.0.9) - Ready for testing on TS-4R and TS-3R DOS machines Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
66 lines
1.7 KiB
Batchfile
66 lines
1.7 KiB
Batchfile
@ECHO OFF
|
|
REM Computer to Network - Upload local files to network
|
|
REM Version: 2.4 - XCOPY /Y for unattended operation (DOS 6.22)
|
|
REM Last modified: 2026-01-20
|
|
|
|
REM Check MACHINE variable
|
|
IF "%MACHINE%"=="" GOTO NO_MACHINE
|
|
|
|
REM Check T: drive
|
|
IF NOT EXIST T:\*.* GOTO NO_DRIVE
|
|
|
|
REM Display banner
|
|
ECHO.
|
|
ECHO ==============================================================
|
|
ECHO Upload: %MACHINE% to Network
|
|
ECHO ==============================================================
|
|
ECHO.
|
|
|
|
REM Create target directories (ignore errors)
|
|
MD T:\%MACHINE% >NUL 2>NUL
|
|
MD T:\%MACHINE%\ProdSW >NUL 2>NUL
|
|
MD T:\%MACHINE%\LOGS >NUL 2>NUL
|
|
|
|
REM Copy batch files (XCOPY /Y = no prompts, no trailing backslash)
|
|
ECHO Copying C:\BAT\*.BAT to T:\%MACHINE%\ProdSW...
|
|
XCOPY C:\BAT\*.BAT T:\%MACHINE%\ProdSW /Y >NUL
|
|
ECHO [OK] Batch files copied
|
|
ECHO.
|
|
|
|
REM Check for ATE directory
|
|
IF NOT EXIST C:\ATE\*.* GOTO SKIP_ATE
|
|
|
|
REM Copy ATE files
|
|
ECHO Copying C:\ATE files to T:\%MACHINE%\ProdSW...
|
|
IF EXIST C:\ATE\*.EXE XCOPY C:\ATE\*.EXE T:\%MACHINE%\ProdSW /Y >NUL
|
|
IF EXIST C:\ATE\*.DAT XCOPY C:\ATE\*.DAT T:\%MACHINE%\ProdSW /Y >NUL
|
|
IF EXIST C:\ATE\*.CFG XCOPY C:\ATE\*.CFG T:\%MACHINE%\ProdSW /Y >NUL
|
|
ECHO [OK] ATE files copied
|
|
ECHO.
|
|
GOTO DONE
|
|
|
|
:SKIP_ATE
|
|
ECHO [INFO] No C:\ATE directory - skipping
|
|
ECHO.
|
|
|
|
:DONE
|
|
ECHO ==============================================================
|
|
ECHO Upload Complete
|
|
ECHO ==============================================================
|
|
ECHO.
|
|
GOTO END
|
|
|
|
:NO_MACHINE
|
|
ECHO [ERROR] MACHINE variable not set
|
|
ECHO Run DEPLOY.BAT first
|
|
PAUSE
|
|
GOTO END
|
|
|
|
:NO_DRIVE
|
|
ECHO [ERROR] T: drive not available
|
|
ECHO Run C:\STARTNET.BAT first
|
|
PAUSE
|
|
GOTO END
|
|
|
|
:END
|