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

@@ -241,3 +241,39 @@ ssh root@192.168.0.117 "crontab -r"
- DOS machine testing started - Error 53 resolved
- Data transfer ongoing (~24GB+ transferred, snapshots pending restart)
- Session saved: ~18:45
## Update: ~19:30 - Batch File Fix and DOS Machine Testing
### DOS Machine Testing Results
- All 4 tested machines (TS-3L, TS-3R, TS-4L, TS-4R) connected to new Linux NAS successfully
- T: drive mapped via NetBIOS name (after killing old NAS nmbd)
- Files successfully copied (3 .LOG files)
- BUT: "Bad command or file name" (5x) and "Too many parameters" (5x) errors from IF EXIST/IF NOT EXIST commands
- Confirmed CTONW.BAT v3.2 on machine, correct line endings (CR+LF verified via DEBUG)
- Root cause: DOS 6.22 IF EXIST command failing on network paths - likely SMB1 compatibility issue with wildcard queries
### Fix Applied: Batch Files v4.0
Eliminated all IF EXIST/IF NOT EXIST checks from startup batch files. Directories pre-created on server.
**CTONW.BAT v4.0** - Direct COPY commands, no IF EXIST guards. Target dirs pre-created on NAS.
**NWTOC.BAT v4.0** - Direct MD and COPY commands, no IF EXIST guards. MD harmless if dir exists locally.
**AUTOEXEC.BAT v4.0** - Removed IF EXIST around CALL commands, direct MD for local dirs.
All deployed to NAS at `/data/test/COMMON/ProdSW/`. Machines will pick up new versions on next boot via NWTOC download.
### Pre-created Directories on NAS
Ran script to create LOGS/5BLOG, LOGS/7BLOG, LOGS/8BLOG, LOGS/DSCLOG, LOGS/HVLOG, LOGS/PWRLOG, LOGS/SCTLOG, LOGS/VASLOG, and Reports for ALL TS-* station directories.
### Old NAS Status
- DHCP at 192.168.0.117
- nmbd killed, cron removed, NetBIOS ports 137/138 blocked via iptables
- rsync data transfer still running (single stream, ~24GB+ transferred)
- Snapshot transfer stopped (was at ~43GB logical), needs restart after data completes
### Pending
1. Reboot a DOS machine to test v4.0 batch files
2. Monitor data transfer completion
3. Restart snapshot transfer after data completes
4. Verify test data appears in correct LOGS subdirectories on NAS
5. Set up AD2 scheduled task for rsync sync
6. Run real (non-dry) Sync-FromNAS-rsync.ps1 on AD2