Renumber Files

Guides

How to Renumber Files After Inserting One Into a Sequence

You have a folder of files numbered 01–50, and a new document belongs at position 15. Now files 15–50 need to become 16–51. Here are the three ways to do it, from slowest to fastest.

Why this is annoying to do by hand

Renaming in ascending order destroys your files' order: the moment you rename 15 to 16, you have two files claiming number 16. To do it manually you have to work backwards — rename 50 → 51 first, then 49 → 50, and so on down to the insertion point. For a 50-file sequence that is 36 renames, each one an opportunity for a typo, a skipped number, or a duplicate.

Windows Explorer and macOS Finder have batch-rename features, but neither understands "shift every number from position 15 upward by one." They can replace text or add sequential numbers to a selection — which renumbers everything, losing the mapping between each file and its original number.

Option 1: Manual renaming (fine for a handful of files)

If only three or four files are affected, just rename them by hand — highest number first, working downward. Double-check the final sequence has no gaps and no duplicates before you move on.

Option 2: A PowerShell or shell script

On Windows, PowerShell can do the descending-order shift in one pass. We maintain a full script with collision handling, zero-padding preservation, and a dry-run mode in our PowerShell batch renumbering guide. This is a good fit if you're comfortable in a terminal and your filenames are consistently formatted.

The catch: real-world filename sets are rarely consistent. Mixed padding (9 vs 09), different separators (01 Contract.pdf vs 01_Contract.pdf vs 1. Contract.pdf), and stray unnumbered files all break naive scripts in ways you only discover after the renames have run.

Option 3: The automatic way

Renumber Files was built for exactly this job. Paste your file list, enter the insert position, and it calculates every rename for you — detecting your numbering style, preserving zero-padding and separators, and showing a full preview before anything changes. It handles multiple insert positions at once and warns about duplicate numbers in the original list.

Everything runs locally in your browser: the filenames you paste are never uploaded to a server, which is why legal and medical teams use it on confidential document bundles.

Checklist before you renumber

  • Confirm the sequence has no existing duplicates or gaps.
  • Note your padding convention (2-digit? 3-digit?) and keep it consistent.
  • Work from highest number to lowest to avoid rename collisions.
  • Preview every rename before executing — especially near the insertion point.

Skip the script — renumber in 30 seconds

Try it free with up to 10 files. No sign-in, nothing uploaded.