Why a bulk rename needs a plan before a script
A bulk rename looks simple: pick a naming convention, apply it to every file, done. The part that actually takes care is checking, before anything runs, that no two different files land on the same new name — because a rename that overwrites a file is not a rename, it's a quiet deletion. The method is the same whether you do it by eye on twelve files or let a tool do it on twelve thousand.
The method
- Write the naming convention as a template of tokens — something like
{seq}_{date}_{custodian}_{stem}{ext}, where each token is a piece of the original filename or metadata. - For every file, substitute its own values into the template to get the proposed new name.
- Collect all the proposed new names into one list and look for duplicates.
- If two different source files produced the same new name, that convention is unsafe for this file set. Fix it — usually by adding a sequence number — and recompute before renaming anything.
A worked example
Say a folder has two files that both start the same way: budget FY24.xlsx and a second copy of budget FY24.xlsx inside a backup subfolder. Using the template {stem}{ext} (just the filename, extension kept), both produce the identical target name budget FY24.xlsx. Applied blindly, the second move would overwrite the first and the original file from the top-level folder is gone — not flagged, not backed up, just gone, because a rename that lands on an existing name replaces it.
Add a sequence number to the template: {seq}_{stem}{ext}. Now the first file processed becomes 1_budget FY24.xlsx and the second becomes 2_budget FY24.xlsx. Two different source files, two different target names, zero collisions. The fix cost one token.
Where the real risk is
The danger isn't the substitution — that's one line of string-replacement per file. It's trusting a convention that happens to work on the ten files you tested and silently fails on file eleven, which has the same stem as file three. Before any rename runs, compute every proposed target name as a complete list, then check that list for duplicates. If it's clean, proceed. If it isn't, the convention needs a token that makes every file distinguishable — a sequence number, a date, or a parent-folder name — before you touch anything.
The free Bulk Rename & Index Planner does exactly this: it computes every target name from your template, blocks any pair that collides instead of applying it, and gives you a plan, an index and a script to read — it never renames a file itself.
Why this is worth knowing
Anyone who has cleaned up a shared drive, organized a discovery export, or standardized a batch of scanned documents has hit this exact problem. Checking for collisions before acting is the one step that turns "probably fine" into "verified safe," and it's the same check whether you're doing it by eye on a dozen files or trusting software to do it on thousands.