@ECHO OFF
REM NWTOCD.BAT - Download with diagnostic pauses (8.3 name)
REM Version: 1.1 - Debug version for recording
REM Last modified: 2026-01-21

ECHO.
ECHO ==============================================================
ECHO DEBUG: NWTOC - Network to Computer Download
ECHO ==============================================================
ECHO.

ECHO NWTOC Step 0: Verifying prerequisites
IF NOT EXIST T:\*.* GOTO NO_DRIVE
ECHO   T: drive OK
IF NOT EXIST T:\COMMON\ProdSW\*.* GOTO NO_COMMON
ECHO   T:\COMMON\ProdSW OK
ECHO.
PAUSE

ECHO.
ECHO NWTOC Step 1: Creating local directories
IF NOT EXIST C:\BAT\*.* MD C:\BAT
ECHO   C:\BAT ready
IF NOT EXIST C:\ATE\*.* MD C:\ATE
ECHO   C:\ATE ready
IF NOT EXIST C:\ATE\5BDATA\*.* MD C:\ATE\5BDATA
IF NOT EXIST C:\ATE\7BDATA\*.* MD C:\ATE\7BDATA
IF NOT EXIST C:\ATE\8BDATA\*.* MD C:\ATE\8BDATA
IF NOT EXIST C:\ATE\DSCDATA\*.* MD C:\ATE\DSCDATA
IF NOT EXIST C:\ATE\HVDATA\*.* MD C:\ATE\HVDATA
IF NOT EXIST C:\ATE\PWRDATA\*.* MD C:\ATE\PWRDATA
IF NOT EXIST C:\ATE\RMSDATA\*.* MD C:\ATE\RMSDATA
IF NOT EXIST C:\ATE\SCTDATA\*.* MD C:\ATE\SCTDATA
ECHO   C:\ATE subfolders ready
IF NOT EXIST C:\NET\*.* MD C:\NET
ECHO   C:\NET ready
PAUSE

ECHO.
ECHO NWTOC Step 2: Downloading batch files to C:\BAT
IF EXIST T:\COMMON\ProdSW\*.BAT ECHO   Found BAT files in T:\COMMON\ProdSW
COPY T:\COMMON\ProdSW\*.BAT C:\BAT
PAUSE

ECHO.
ECHO NWTOC Step 3: Downloading 5BDATA
IF EXIST T:\Ate\ProdSW\5BDATA\*.* ECHO   Found files in T:\Ate\ProdSW\5BDATA
IF EXIST T:\Ate\ProdSW\5BDATA\*.* COPY T:\Ate\ProdSW\5BDATA\*.* C:\ATE\5BDATA
IF NOT EXIST T:\Ate\ProdSW\5BDATA\*.* ECHO   No files in T:\Ate\ProdSW\5BDATA
PAUSE

ECHO.
ECHO NWTOC Step 4: Downloading 7BDATA
IF EXIST T:\Ate\ProdSW\7BDATA\*.* ECHO   Found files in T:\Ate\ProdSW\7BDATA
IF EXIST T:\Ate\ProdSW\7BDATA\*.* COPY T:\Ate\ProdSW\7BDATA\*.* C:\ATE\7BDATA
IF NOT EXIST T:\Ate\ProdSW\7BDATA\*.* ECHO   No files in T:\Ate\ProdSW\7BDATA
PAUSE

ECHO.
ECHO NWTOC Step 5: Downloading 8BDATA
IF EXIST T:\Ate\ProdSW\8BDATA\*.* ECHO   Found files in T:\Ate\ProdSW\8BDATA
IF EXIST T:\Ate\ProdSW\8BDATA\*.* COPY T:\Ate\ProdSW\8BDATA\*.* C:\ATE\8BDATA
IF NOT EXIST T:\Ate\ProdSW\8BDATA\*.* ECHO   No files in T:\Ate\ProdSW\8BDATA
PAUSE

ECHO.
ECHO NWTOC Step 6: Downloading DSCDATA
IF EXIST T:\Ate\ProdSW\DSCDATA\*.* ECHO   Found files in T:\Ate\ProdSW\DSCDATA
IF EXIST T:\Ate\ProdSW\DSCDATA\*.* COPY T:\Ate\ProdSW\DSCDATA\*.* C:\ATE\DSCDATA
IF NOT EXIST T:\Ate\ProdSW\DSCDATA\*.* ECHO   No files in T:\Ate\ProdSW\DSCDATA
PAUSE

ECHO.
ECHO NWTOC Step 7: Downloading HVDATA
IF EXIST T:\Ate\ProdSW\HVDATA\*.* ECHO   Found files in T:\Ate\ProdSW\HVDATA
IF EXIST T:\Ate\ProdSW\HVDATA\*.* COPY T:\Ate\ProdSW\HVDATA\*.* C:\ATE\HVDATA
IF NOT EXIST T:\Ate\ProdSW\HVDATA\*.* ECHO   No files in T:\Ate\ProdSW\HVDATA
PAUSE

ECHO.
ECHO NWTOC Step 8: Downloading PWRDATA
IF EXIST T:\Ate\ProdSW\PWRDATA\*.* ECHO   Found files in T:\Ate\ProdSW\PWRDATA
IF EXIST T:\Ate\ProdSW\PWRDATA\*.* COPY T:\Ate\ProdSW\PWRDATA\*.* C:\ATE\PWRDATA
IF NOT EXIST T:\Ate\ProdSW\PWRDATA\*.* ECHO   No files in T:\Ate\ProdSW\PWRDATA
PAUSE

ECHO.
ECHO NWTOC Step 9: Downloading RMSDATA
IF EXIST T:\Ate\ProdSW\RMSDATA\*.* ECHO   Found files in T:\Ate\ProdSW\RMSDATA
IF EXIST T:\Ate\ProdSW\RMSDATA\*.* COPY T:\Ate\ProdSW\RMSDATA\*.* C:\ATE\RMSDATA
IF NOT EXIST T:\Ate\ProdSW\RMSDATA\*.* ECHO   No files in T:\Ate\ProdSW\RMSDATA
PAUSE

ECHO.
ECHO NWTOC Step 10: Downloading SCTDATA
IF EXIST T:\Ate\ProdSW\SCTDATA\*.* ECHO   Found files in T:\Ate\ProdSW\SCTDATA
IF EXIST T:\Ate\ProdSW\SCTDATA\*.* COPY T:\Ate\ProdSW\SCTDATA\*.* C:\ATE\SCTDATA
IF NOT EXIST T:\Ate\ProdSW\SCTDATA\*.* ECHO   No files in T:\Ate\ProdSW\SCTDATA
PAUSE

ECHO.
ECHO NWTOC Step 11: Checking for network client updates
IF NOT EXIST T:\COMMON\NET\*.* GOTO SKIP_NET
ECHO   Found files in T:\COMMON\NET
COPY T:\COMMON\NET\*.* C:\NET
ECHO   Network files copied
PAUSE
GOTO DONE

:SKIP_NET
ECHO   No network updates in T:\COMMON\NET
PAUSE

:DONE
ECHO.
ECHO ==============================================================
ECHO NWTOC-DEBUG Complete
ECHO ==============================================================
GOTO END

:NO_DRIVE
ECHO.
ECHO NWTOC ERROR: T: drive not available
PAUSE
GOTO END

:NO_COMMON
ECHO.
ECHO NWTOC ERROR: T:\COMMON\ProdSW not found
PAUSE
GOTO END

:END
