Skip PT STMT archive folders on export.txt search
This commit is contained in:
@@ -72,5 +72,6 @@ Found: C:\Patients\abc\Patient\Export\.
|
|||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
- Uses `pushd`/`popd` to work around Windows' 260-character path length limit
|
- 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
|
||||||
- Safe to re-run — `mkdir` for the dated folder will silently skip if it already exists
|
- Safe to re-run — `mkdir` for the dated folder will silently skip if it already exists
|
||||||
- Date format is `YYYYMMDD` (e.g. `20260423`)
|
- Date format is `YYYYMMDD` (e.g. `20260423`)
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ echo.
|
|||||||
REM === LOOP THROUGH ALL SUBFOLDERS ===
|
REM === LOOP THROUGH ALL SUBFOLDERS ===
|
||||||
for /r "%ROOT%" %%d in (.) do (
|
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
|
||||||
|
if errorlevel 1 (
|
||||||
|
|
||||||
if exist "%%d\export.txt" (
|
if exist "%%d\export.txt" (
|
||||||
echo Found: %%d
|
echo Found: %%d
|
||||||
|
|
||||||
@@ -48,6 +52,8 @@ for /r "%ROOT%" %%d in (.) do (
|
|||||||
echo.
|
echo.
|
||||||
popd
|
popd
|
||||||
)
|
)
|
||||||
|
|
||||||
|
) REM end skip PT STMT check
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Done.
|
echo Done.
|
||||||
|
|||||||
Reference in New Issue
Block a user