Problem
A file-retention script uses filename patterns to delete temporary assets and accidentally matches a legitimate master because the naming convention was never formalized.
Solution
Root Cause / Diagnostic:
Poorly defined deletion rules (e.g., deleting any file with temp, test, or unpadded numbers) match unintended master assets when naming conventions lack strict formatting boundaries.
Actionable Fix:
1. Isolate Temporary Assets by Directory, Not Filename: Direct all scratch, cache, and temporary render files to designated, segregated scratch folders (/Scratch/Temp/).
2. Restrict Deletion Scripts to Specific Extensions and Explicit Prefixes: Require deletion automation to target only specific temporary prefixes (e.g., _TEMP_*) and cache extensions (.tmp, .pek, .cfa).
3. Implement Dry-Run Logging Before Automated Deletion: Configure automated retention cron jobs to log matching files to a review report for 24 hours prior to permanent deletion.
Pro Tip:
Never run deletion scripts based on broad filename wildcard searches; configure your retention bots to delete strictly by directory path (e.g., purge only files inside /00_Scratch_Cache/).
Poorly defined deletion rules (e.g., deleting any file with temp, test, or unpadded numbers) match unintended master assets when naming conventions lack strict formatting boundaries.
Actionable Fix:
1. Isolate Temporary Assets by Directory, Not Filename: Direct all scratch, cache, and temporary render files to designated, segregated scratch folders (/Scratch/Temp/).
2. Restrict Deletion Scripts to Specific Extensions and Explicit Prefixes: Require deletion automation to target only specific temporary prefixes (e.g., _TEMP_*) and cache extensions (.tmp, .pek, .cfa).
3. Implement Dry-Run Logging Before Automated Deletion: Configure automated retention cron jobs to log matching files to a review report for 24 hours prior to permanent deletion.
Pro Tip:
Never run deletion scripts based on broad filename wildcard searches; configure your retention bots to delete strictly by directory path (e.g., purge only files inside /00_Scratch_Cache/).