# Dataforth DOS Update System - Project Index

**Client:** Dataforth
**Project:** DOS 6.22 Update System for QC Test Stations
**Status:** Production Ready (2026-01-20)
**Machines:** ~30 DOS test stations (TS-01 through TS-30)

---

## Project Overview

Automated update system for Dataforth's DOS 6.22 quality control test stations. Provides network-based software updates, test data synchronization, and system backup capabilities.

---

## Quick Reference

### Key Files (Production)

**On NAS (T:\COMMON\ProdSW\):**
- NWTOC.BAT v2.5 - Download updates from network
- UPDATE.BAT v2.3 - Full system backup
- CTONW.BAT v2.1 - Upload test data to network
- CHECKUPD.BAT v1.3 - Check for available updates
- DEPLOY.BAT - One-time deployment installer
- AUTOEXEC.BAT - Startup configuration template
- STARTNET.BAT v2.0 - Network initialization

**On NAS Root (T:\):**
- UPDATE.BAT - Redirect script (calls DEPLOY.BAT)

### Infrastructure

**AD2 (Production Server):**
- Host: 192.168.0.6
- User: INTRANET\sysadmin
- Path: C:\Shares\test\
- Sync: Every 15 minutes (AD2 → NAS)

**D2TESTNAS (SMB1 Proxy):**
- Host: 192.168.0.9
- User: root (SSH with ed25519 key)
- Share: \\D2TESTNAS\test → /data/test
- Role: SMB1 bridge for DOS 6.22 machines

---

## Folder Structure

```
projects/dataforth-dos/
├── batch-files/          # All DOS .BAT files
├── deployment-scripts/   # PowerShell deployment scripts
├── documentation/        # Technical docs and fix summaries
└── session-logs/         # DOS-specific session logs
```

---

## Documentation Files

### Main Documentation
- **DOS_FIX_COMPLETE_2026-01-20.md** - Complete fix summary for 2026-01-20 session
- **DOS_DEPLOYMENT_GUIDE.md** - Step-by-step deployment procedures
- **DOS_DEPLOYMENT_STATUS.md** - Current deployment status
- **DOS_BATCH_ANALYSIS.md** - DOS 6.22 compatibility analysis

### Specific Fixes
- **UPDATE_BAT_FIX_2026-01-20.md** - XCOPY /D parameter error fix
- **STARTNET_PATH_FIX_2026-01-20.md** - C:\NET vs C:\STARTNET path correction
- **DOS_FIX_SUMMARY.md** - Summary of all DOS compatibility fixes

---

## Session History

### 2026-01-20: DOS Deployment Error Fixes

**Issues Fixed:**
1. UPDATE.BAT XCOPY /D parameter error ("Invalid number of parameters")
2. Wrong STARTNET.BAT path references (C:\NET → C:\STARTNET)
3. NWTOC.BAT XCOPY /D errors (2 instances)
4. CHECKUPD.BAT XCOPY /D error
5. Root UPDATE.BAT structure (wrong file deployed)
6. Unreliable drive tests (DIR T:\ >nul pattern)
7. Empty directory checks (T:\COMMON\*.* failed)
8. XCOPY "Too many parameters" errors (replaced with COPY)

**Files Modified:** 9 production BAT files
**Deployments:** 39+ successful deployments to AD2 and NAS
**Status:** All DOS 6.22 compatibility issues resolved

**See:** `documentation/DOS_FIX_COMPLETE_2026-01-20.md`

---

## Batch Files Inventory

### Production Utilities (17 files)
- AUTOEXEC.BAT - System startup configuration
- CHECKUPD.BAT v1.3 - Check for updates
- CTONW.BAT v2.1 - Computer to network upload
- CTONWTXT.BAT - Text file archiving
- DEPLOY.BAT - One-time deployment installer
- DOSTEST.BAT v1.1 - Deployment test script
- NWTOC.BAT v2.5 - Network to computer download
- REBOOT.BAT - Staged update applier
- STAGE.BAT - System file staging
- STARTNET.BAT v2.0 - Network client startup
- UPDATE.BAT v2.3 - Full system backup
- UPDATE-ROOT.BAT - Root redirect script

### Deployment Variants (5 files)
- DEPLOY_FROM_AD2.BAT - Deploy from AD2
- DEPLOY_FROM_NAS.BAT - Deploy from NAS
- DEPLOY_TEST.BAT - Test deployment
- DEPLOY_VERIFY.BAT - Verify deployment
- TEST-NWTOC.BAT - Quick test runner

---

## Deployment Scripts Inventory

### Active Deployment Scripts (13 scripts)
- deploy-update-fix.ps1 - Deploy UPDATE.BAT fixes
- deploy-startnet-fix.ps1 - Deploy STARTNET path corrections
- deploy-xcopy-fix-round2.ps1 - Deploy NWTOC/CHECKUPD XCOPY fixes
- deploy-drive-test-fix.ps1 - Deploy drive test improvements
- push-to-nas-direct.ps1 - Direct NAS deployment via SSH
- (+ 8 more historical deployment scripts)

### Fix Scripts (20+ scripts)
- Various fix-*.ps1 scripts for specific issues during development

---

## DOS 6.22 Compatibility Rules

**Critical Limitations:**
1. XCOPY /D requires date parameter (/D:mm-dd-yy)
2. No IF /I (case-insensitive compare)
3. No FOR /F loops
4. No %COMPUTERNAME% variable
5. Use *.* for directory checks, not \NUL
6. DIR drive:\ >nul is unreliable - use IF NOT EXIST drive:\*.*
7. XCOPY trailing backslashes cause "Too many parameters"
8. COPY is more reliable than XCOPY for flat files

**See:** `documentation/DOS_BATCH_ANALYSIS.md`

---

## Testing Checklist

**Pilot Machine:** TS-4R

### 1. Update Files
```batch
T:\COMMON\ProdSW\NWTOC.BAT
```

### 2. Test Backup
```batch
C:\BAT\UPDATE
```

### 3. Test Check Updates
```batch
C:\BAT\CHECKUPD
```

### 4. Verify Network
```batch
C:\STARTNET.BAT
```

---

## Next Steps

1. ~~Fix deployment errors~~ ✓ COMPLETE
2. Test on TS-4R pilot machine (IN PROGRESS)
3. Monitor for 1-2 days
4. Deploy to remaining ~29 DOS machines
5. Document final rollout procedures

---

## Contact & Support

**Infrastructure Access:** See `../../credentials.md`
**Session Logs:** See `session-logs/` directory
**API Integration:** See `../claudetools-api/`

---

**Last Updated:** 2026-01-20
**Project Status:** Production Ready - Awaiting Pilot Testing
