fix: Remove NUL device references from CTONW.BAT and add CTONWTXT.BAT
Fixed CTONW.BAT DOS 6.22 compatibility: - Changed 14 directory existence checks from \NUL to \*.* * C:\BAT\NUL -> C:\BAT\*.* * T:\%MACHINE%\NUL -> T:\%MACHINE%\*.* * %TARGETDIR%\NUL -> %TARGETDIR%\*.* * %LOGSDIR%\NUL -> %LOGSDIR%\*.* * All log subdirectories (8BLOG, DSCLOG, HVLOG, etc.) * All data source directories (8BDATA, DSCDATA, HVDATA, etc.) - Preserved correct >NUL 2>NUL output redirection (lowercase) Added CTONWTXT.BAT: - Text datasheet archiving script called by ARCHBAT.BAT - Copies C:\STAGE\*.txt to network target directory - Already DOS 6.22 compatible (no modifications needed) All BAT files for ARCHBAT.BAT workflow now deployed: - NWTOC.BAT (network to computer) - CTONW.BAT (computer to network) - CTONWTXT.BAT (text file archiving) NUL is a reserved device name in DOS/Windows and cannot be used as a filename or in path existence checks. Using *.* wildcard correctly tests for directory existence. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
34
CTONWTXT.BAT
Normal file
34
CTONWTXT.BAT
Normal file
@@ -0,0 +1,34 @@
|
||||
@ECHO OFF
|
||||
REM PWR: 2013-02-06
|
||||
ECHO .....................................................
|
||||
ECHO Archiving text datasheet files to %2 on network...
|
||||
ECHO CtoNWtxt.bat > C:\ATE\CtoNWtxt.log
|
||||
ECHO 2013-02-06 Version >> C:\ATE\CtoNWtxt.log
|
||||
ECHO ..................................................... >> C:\ATE\CtoNWtxt.log
|
||||
ECHO Important! This log file is from the previous >> C:\ATE\CtoNWtxt.log
|
||||
ECHO operation since C to Network >> C:\ATE\CtoNWtxt.log
|
||||
ECHO archiving is before text file >> C:\ATE\CtoNWtxt.log
|
||||
ECHO archiving! >> C:\ATE\CtoNWtxt.log
|
||||
ECHO ..................................................... >> C:\ATE\CtoNWtxt.log
|
||||
ECHO Copying from C:\STAGE\*.txt to %2 >> C:\ATE\CtoNWtxt.log
|
||||
IF EXIST C:\STAGE\*.txt GOTO FILEXFER
|
||||
REM IF ERRORLEVEL=1 ECHO No files were found to transfer
|
||||
ECHO No files were found to transfer
|
||||
ECHO No files were found to transfer >> C:\ATE\CtoNWtxt.log
|
||||
GOTO END
|
||||
:FILEXFER
|
||||
IF NOT EXIST %2\serve.sys GOTO NODIR
|
||||
copy C:\STAGE\*.txt %2 >> C:\ATE\CtoNWtxt.log
|
||||
IF ERRORLEVEL=0 ECHO Copy Completed normally
|
||||
DEL C:\STAGE\*.txt >> C:\ATE\CtoNWtxt.log
|
||||
ECHO Network archiving of text datasheet files to %2 done!
|
||||
ECHO .....................................................
|
||||
GOTO END
|
||||
:NODIR
|
||||
ECHO %2\serve.sys not found. >> C:\ATE\CtoNWtxt.log
|
||||
ECHO %2\serve.sys not found. Check Network connection.
|
||||
:END
|
||||
ECHO Network archiving of text datasheet files to %2 done!
|
||||
ECHO .....................................................
|
||||
|
||||
|
||||
Reference in New Issue
Block a user