File Rename Creates Duplicate Version History: Fix
🔍 WiseChecker

File Rename Creates Duplicate Version History: Fix

When you rename a file in SharePoint or OneDrive, you may notice the version history shows the file as a new version instead of updating the name. This can create confusion because the version list appears to contain duplicate entries or the file name change is not reflected in the version history. The root cause is how SharePoint handles file metadata: renaming a file triggers a minor update that creates a new version entry but does not overwrite the previous version's name. This article explains why this happens and provides steps to prevent or fix duplicate version history after a file rename.

Key Takeaways: Fixing Duplicate Version History After File Rename

  • SharePoint versioning settings > Create major versions: Renaming a file with major versioning enabled creates a new minor version, not a major version, which keeps the version list clean.
  • OneDrive sync client > Rename in File Explorer: Renaming a file through File Explorer while OneDrive sync is active can trigger duplicate version entries; use the web interface instead.
  • SharePoint admin center > Site collection versioning limits: Setting a low number of versions (e.g., 100) prevents the version history from growing too large after frequent renames.

ADVERTISEMENT

Why Renaming a File Creates Duplicate Version History

SharePoint stores each file as a list item with metadata, including the file name. When you rename a file, SharePoint treats the name change as a modification to the list item. If versioning is enabled, SharePoint creates a new version to record this change. The previous version retains the old file name, so the version history displays entries with different names for the same file.

This behavior is by design. SharePoint does not update the file name across all existing versions. Instead, each version stores the file name as it existed at the time the version was created. As a result, renaming a file multiple times can produce a version history where each entry shows a different name, making it appear as though there are duplicate files.

How Versioning Types Affect Rename Behavior

SharePoint supports two versioning modes: major versions only and major and minor (draft) versions. When you rename a file in a library set to major versions only, SharePoint creates a new major version. In a library with major and minor versions, renaming creates a minor version. The version number increments in both cases, but the previous version's name remains unchanged.

Why the Duplicate Name Appears in the Version List

The version history page displays the file name as stored in each version. If you rename a file from Report.docx to SalesReport.docx, version 1.0 shows Report.docx and version 2.0 shows SalesReport.docx. To a user unfamiliar with versioning, this looks like two different files. The issue is cosmetic: the file is the same, but the names differ across versions.

Steps to Prevent Duplicate Version History When Renaming Files

  1. Use the SharePoint web interface to rename files
    Open the document library in a browser. Select the file, click the three dots (More actions), and choose Rename. Type the new name and press Enter. This method ensures the rename is recorded as a single metadata change.
  2. Disable versioning for libraries where renames are frequent
    Go to Library settings > Versioning settings. Under Document Version History, select No versioning. Click OK. This stops SharePoint from creating new versions when files are renamed. Note that this also disables the ability to restore previous versions.
  3. Set a low version limit to automatically clean old versions
    In Versioning settings, under Keep the following number of major versions, enter a small number like 10 or 50. Under Keep drafts for the following number of major versions, enter the same number. When the limit is reached, SharePoint automatically deletes the oldest versions, including those with old file names.
  4. Rename files before uploading to avoid version history entirely
    If a file has not yet been uploaded, name it correctly on your local drive. Upload the file to SharePoint. The first version will have the correct name, and no rename is needed.
  5. Use a content type with a custom name field instead of the file name
    Create a content type that includes a column for the document title. Display that column in the library view. Users can change the title without affecting the physical file name. This avoids rename operations altogether.

How to Clean Existing Duplicate Version History

If version history already contains duplicate names, you can delete specific versions to remove the old entries. This does not affect the current file.

  1. Open version history for the file
    Select the file, click the three dots, and choose Version history. A panel opens listing all versions.
  2. Identify versions with the old file name
    Look at the Modified column and the file name shown for each version. Versions created before the rename display the old name.
  3. Delete unwanted versions
    Hover over a version row, click the down arrow, and select Delete. Confirm the deletion. Repeat for each version you want to remove.

ADVERTISEMENT

If Renaming Still Creates Duplicate Version History

OneDrive Sync Causes Extra Versions

When you rename a file in File Explorer that is synced with OneDrive, the sync client may interpret the rename as a delete and a new file. This can create two version entries: one for the old name and one for the new name. To avoid this, always rename files through the SharePoint web interface. If you must rename in File Explorer, pause sync first, rename the file, then resume sync.

File Checked Out by Another User

If a file is checked out, renaming it creates a version that records the checkout status. The version history may show a version with the old name and a subsequent version with the new name. Require users to check in files before renaming. You can enforce this in Library settings > Versioning settings by requiring documents to be checked out before editing.

Power Automate or Custom Script Triggers Version Creation

A Power Automate flow or custom script that runs on file modification may also create a version when a rename occurs. Review any flows that trigger on file changes. Modify the flow to check if the change was a rename and skip version creation if needed.

Major Versions Only vs Major and Minor Versions: Effect on Rename

Item Major Versions Only Major and Minor Versions
Version created on rename Major version (e.g., 2.0) Minor version (e.g., 1.1)
Version limit applies Yes, to major versions Yes, to major and minor versions separately
Draft visibility Not applicable Users with Read permission cannot see minor versions
Duplicate name visibility Visible to all users with version history access Visible only to users with Edit permission or higher

Renaming a file will always create a new version entry. Using major versions only makes the old name visible to everyone. Using major and minor versions hides the old name from most viewers because minor versions are treated as drafts. Choose the versioning mode based on how visible you want the old name to be.

After applying the steps in this article, you can prevent duplicate version history from file renames. Start by setting a low version limit to automatically purge old entries. For libraries where renames are common, consider disabling versioning or using a content type with a separate title column. If duplicate history already exists, delete the unwanted versions manually. For advanced control, switch to major and minor versioning to hide minor versions from readers.

ADVERTISEMENT