From 85391a137676c9b58e2dcafeb906f57290016663 Mon Sep 17 00:00:00 2001 From: blance Date: Thu, 23 Apr 2026 21:37:32 -0500 Subject: [PATCH] Add test environment setup script --- Create Test Environment.bat | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Create Test Environment.bat diff --git a/Create Test Environment.bat b/Create Test Environment.bat new file mode 100644 index 0000000..a707d6f --- /dev/null +++ b/Create Test Environment.bat @@ -0,0 +1,51 @@ +@echo off +setlocal + +REM === TEST ENVIRONMENT SETUP === +REM Creates a sample folder structure to test the rename/move script. +REM Run this to reset back to a clean baseline at any time. + +set "TESTROOT=%~dp0TEST" + +echo Resetting test environment at %TESTROOT%... +echo. + +REM Wipe and recreate the test root +if exist "%TESTROOT%" ( + rd /s /q "%TESTROOT%" + echo Cleared existing test folder. +) + +REM === CREATE PATIENT FOLDERS === +REM Each has Patient\Export\ with an EXPORT.txt and some .tif files + +for %%p in (Patient001 Patient002 Patient003) do ( + mkdir "%TESTROOT%\%%p\Patient\Export" + echo.> "%TESTROOT%\%%p\Patient\Export\EXPORT.txt" + echo.> "%TESTROOT%\%%p\Patient\Export\1000001.tif" + echo.> "%TESTROOT%\%%p\Patient\Export\1000002.tif" + echo.> "%TESTROOT%\%%p\Patient\Export\1000003.tif" + echo Created: %%p +) + +REM === CREATE AN ARCHIVE FOLDER (should be skipped by the main script) === +mkdir "%TESTROOT%\Patient004\Patient\Export\archive" +echo.> "%TESTROOT%\Patient004\Patient\Export\archive\EXPORT.txt" +echo.> "%TESTROOT%\Patient004\Patient\Export\archive\1000001.tif" +echo Created: Patient004 (archive folder - should be skipped) + +REM === CREATE A PT STMT FOLDER (should also be skipped) === +mkdir "%TESTROOT%\Patient005\Patient\Export\PT STMT_20260101" +echo.> "%TESTROOT%\Patient005\Patient\Export\PT STMT_20260101\EXPORT.txt" +echo.> "%TESTROOT%\Patient005\Patient\Export\PT STMT_20260101\1000001.tif" +echo Created: Patient005 (PT STMT folder - should be skipped) + +echo. +echo Done. Test environment ready at: +echo %TESTROOT% +echo. +echo To test the rename script, copy "Rename and Move PT STMT.bat" into: +echo %TESTROOT% +echo and run it from there. +echo. +pause