Also skip folders containing 'archive' in path

This commit is contained in:
blance
2026-04-23 21:20:50 -05:00
parent f4e11b1c6a
commit 4562368eca
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -72,6 +72,6 @@ Found: C:\Patients\abc\Patient\Export\.
### Notes
- Uses `pushd`/`popd` to work around Windows' 260-character path length limit
- Skips any folder whose path contains `PT STMT` so already-archived folders are never re-processed
- Skips any folder whose path contains `PT STMT` or `archive` so already-processed folders are never re-processed
- Safe to re-run — `mkdir` for the dated folder will silently skip if it already exists
- Date format is `YYYYMMDD` (e.g. `20260423`)
+2 -2
View File
@@ -24,8 +24,8 @@ echo.
REM === LOOP THROUGH ALL SUBFOLDERS ===
for /r "%ROOT%" %%d in (.) do (
REM Skip any folder whose path contains "PT STMT" (already-archived folders)
echo %%d | findstr /i "PT STMT" >nul
REM Skip any folder whose path contains "PT STMT" or "archive"
echo %%d | findstr /i "PT STMT archive" >nul
if errorlevel 1 (
if exist "%%d\export.txt" (