Dataforth: Fix DEPLOY.BAT trailing space bug, session log update

DEPLOY v4.1 fixes critical bug where ECHO >> redirects included
trailing space in MACHINE variable, causing "Too many parameters"
on all COPY commands with subdirectory paths. TS-4L data upload
confirmed working - 84 test files + 90 reports on NAS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 20:17:34 -07:00
parent 78528d545e
commit 6c2c693e6d
2 changed files with 166 additions and 42 deletions

View File

@@ -271,9 +271,96 @@ Ran script to create LOGS/5BLOG, LOGS/7BLOG, LOGS/8BLOG, LOGS/DSCLOG, LOGS/HVLOG
- 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
1. Reboot a DOS machine to test v4.0 batch files (second boot needed for NWTOC v4.0)
2. Monitor data transfer completion (rsync single stream still running as of ~20:00)
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
## Update: ~20:00 - DEPLOY Trailing Space Bug and Data Upload Success
### Critical Bug Found: DEPLOY.BAT Trailing Space
- **Root cause of ALL "Too many parameters" errors**: `ECHO SET MACHINE=%MACHINE% >> C:\AUTOEXEC.BAT` includes the space before `>>` in the output
- This sets `MACHINE=TS-3L ` (with trailing space) which causes `T:\TS-3L \LOGS\DSCLOG` to be parsed as two parameters
- **Fix**: DEPLOY v4.1 moves redirect before ECHO: `>>C:\AUTOEXEC.BAT ECHO SET MACHINE=%MACHINE%`
- First line uses `>` (overwrite), rest use `>>` (append)
- DEPLOY v4.1 deployed to NAS at `/data/test/COMMON/ProdSW/DEPLOY.BAT`
### Samba Case Sensitivity - Confirmed OK
- `smb.conf` has `case sensitive = no` and `default case = upper`
- No duplicate directories (only `TS-4L` exists, not `ts-4L`)
### TS-3L Deploy Test
- Ran `T:\UPDATE TS-3L` which calls DEPLOY v4.0 (before trailing space fix)
- DEPLOY completed, files confirmed v4.0 on machine via TYPE
- After reboot: NAS still showed old CTONW.LOG/NWTOC.LOG - MACHINE had trailing space
- Running CTONW manually showed 9x "Too many parameters" on all COPY-to-subdirectory lines
- `COPY C:\ATE\*.LOG T:\%MACHINE%` worked (no subdirectory in path) but `COPY ... T:\%MACHINE%\LOGS\DSCLOG` failed
- This confirmed the trailing space theory - space before `\LOGS\` splits the path
### TS-4L Data Upload - SUCCESS
- TS-4L uploaded data at 20:10 with clean MACHINE variable (no trailing space)
- **84 test data files uploaded to NAS:**
- 5BLOG: 20 files
- 7BLOG: 29 files (historical .SHT files)
- 8BLOG: 10 files
- DSCLOG: 21 files (including today's 38-02.DAT from 03-12-26)
- SCTLOG: 2 files
- VASLOG: 2 files
- **90+ work-order Reports** (.TXT files) uploaded to TS-4L/Reports/
- **3 LOG files** (NWTOC.LOG, CTONW.LOG, CTONWTXT.LOG)
- CTONW.LOG confirms: `CTONW.BAT v4.0 / Machine: TS-4L` (no trailing space)
### Original STARTNET.BAT Found (from TS-3L backup)
The actual STARTNET.BAT on DOS machines loads network drivers manually:
```
LH /L:0;1,45472 /S c:\net\smartdrv.exe /q
c:\net\net initialize
c:\net\netbind.com
lh c:\net\umb.com
c:\net\tcptsr.exe
c:\net\tinyrfc.exe
c:\net\nmtsr.exe
c:\net\emsbfr.exe
c:\net\net start
net use T: \\d2testnas\test
net use X: \\d2testnas\datasheets
```
- `net start` prompts for computer name (pre-populated from SYSTEM.INI)
- Could add `/y` flag to suppress prompt, or use MACHINE variable
- Our v2.0 STARTNET.BAT on ProdSW is a simplified rewrite that was never deployed to machines
### T:\UPDATE.BAT
- Tiny 4-line wrapper at root of test share: `CALL T:\COMMON\ProdSW\DEPLOY.BAT %1`
- Allows running `T:\UPDATE TS-3L` from DOS machines
### Rsync Transfer Status
- Single stream still running from old NAS (.117) to new VM (.9)
- Snapshot transfer still pending restart
### Files Modified This Update
- `D:\ClaudeTools\projects\dataforth-dos\batch-files\DEPLOY.BAT` - v4.1 (trailing space fix)
- Deployed to NAS at `/data/test/COMMON/ProdSW/DEPLOY.BAT`
---
## Pending/Incomplete Tasks (Updated)
### Immediate
1. **Re-deploy TS-3L with DEPLOY v4.1** - needs new deploy + reboot to fix trailing space
2. **Set up AD2 rsync scheduled task** - Sync-FromNAS-rsync.ps1 deployed but no task created (15-min interval planned)
3. **Run real (non-dry) sync** of Sync-FromNAS-rsync.ps1 on AD2
4. **Database ingestion pipeline** - No ingestion exists yet. Data flows: NAS -> AD2 -> MariaDB @ 172.16.3.30
### After Data Transfer Complete
5. **Monitor old NAS rsync completion** - single stream still running
6. **Restart snapshot transfer** after data completes
7. **Verify data integrity** - compare file counts between old and new NAS
8. **Power off old NAS** once confirmed
### Batch File Updates Needed
9. **UPDATE.BAT** (in ProdSW) - has IF EXIST checks, needs v4.0 treatment
10. **ATESYNC.BAT / ATESYNCD.BAT** - have IF EXIST checks, need v4.0 treatment (not currently called by AUTOEXEC)
11. **STARTNET.BAT** - consider deploying updated version or adding `/y` to suppress net start prompt
12. **AV exclusions on AD2** - add exclusions for C:\Shares\test\ and rsync.exe