diff --git a/.specstory/history/2025-08-17_20-18Z-change-date-format-in-workflow-scripts.md b/.specstory/history/2025-08-17_20-18Z-change-date-format-in-workflow-scripts.md index d77550a..9c786d7 100644 --- a/.specstory/history/2025-08-17_20-18Z-change-date-format-in-workflow-scripts.md +++ b/.specstory/history/2025-08-17_20-18Z-change-date-format-in-workflow-scripts.md @@ -320,3 +320,69 @@ The scripts will now work whether you run them from: --- +_**User**_ + +this needs to be updated as well; it should scan folders with the format YYYY-MM-DD instead of daily_YYMMDD + +--- + +_**Assistant**_ + +I can see that the `UpdateSequences.bat` script is still looking for folders with the old `daily_*` pattern, but now that we've updated the date format to YYYY-MM-DD, it needs to be updated to scan for the new format. Let me update this script: + + +--- + +
Edit file: UpdateSequences.bat + +I will update the script to scan for folders with YYYY-MM-DD format instead of the old daily_* pattern, and update the log messages and comments accordingly. + +**Chunk 1** +Lines added: 2, lines removed: 1 + +```diff +@@ -21,5 +21,6 @@ + set /a mirrorFailures=0 + +- for /d %%D in (daily_*) do ( ++ rem Scan for folders with YYYY-MM-DD format (e.g., 2023-12-15) ++ for /d %%D in (????-??-??) do ( + if exist "%%D" ( + set /a dailiesScanned+=1 +``` + +
+ +--- + +Perfect! I've updated the `UpdateSequences.bat` script to work with the new YYYY-MM-DD date format. Here's what changed: + +## Key Changes: + +### **Folder Pattern Update:** +- **Before**: `for /d %%D in (daily_*) do (` +- **After**: `for /d %%D in (????-??-??) do (` + +### **Pattern Explanation:** +The new pattern `????-??-??` will match folders with the format: +- `????` = 4 digits for year (e.g., 2023) +- `-` = literal hyphen +- `??` = 2 digits for month (e.g., 12) +- `-` = literal hyphen +- `??` = 2 digits for day (e.g., 15) + +This will now correctly scan for folders like: +- `2023-12-15` +- `2024-01-03` +- `2024-12-31` + +## What This Means: + +1. **Compatibility**: The script now works with the new date format you've implemented +2. **Pattern Matching**: Uses Windows wildcard patterns that are more precise than the old `daily_*` pattern +3. **Future-Proof**: Will work with dates up to 9999-99-99 (though realistically up to 2099-12-31) + +The script will now properly scan and process your daily folders that use the YYYY-MM-DD format, maintaining all the existing functionality for mirroring sequences and creating the `_CURRENT` directory structure. + +--- + diff --git a/UpdateSequences.bat b/UpdateSequences.bat index a7a216f..b6bfeca 100644 --- a/UpdateSequences.bat +++ b/UpdateSequences.bat @@ -20,7 +20,8 @@ set /a sequencesTotal=0 set /a sequencesMirrored=0 set /a mirrorFailures=0 -for /d %%D in (daily_*) do ( +rem Scan for folders with YYYY-MM-DD format (e.g., 2023-12-15) +for /d %%D in (????-??-??) do ( if exist "%%D" ( set /a dailiesScanned+=1 set "hadSub=0"