When you rename a file in SharePoint or OneDrive for Business, you may notice that the version history appears to contain duplicate entries. The renamed file shows two identical versions with the same timestamp and same user name. This behavior is confusing and makes it difficult to track actual changes. The cause lies in how SharePoint handles file name changes internally as a metadata update rather than a content change. This article explains the technical reason behind the duplicate version history and provides steps to verify and manage version history correctly.
Key Takeaways: File Rename and Version History Behavior
- Version history page in SharePoint: Shows two entries for a rename operation because SharePoint logs both the old and new file names as separate version events.
- SharePoint admin center > Versioning settings: Controls how many versions are kept but does not prevent duplicate entries caused by renames.
- Site collection audit log > File operations: Use this log to distinguish a rename from actual content edits in the version history.
Why File Rename Creates Two Version History Entries
SharePoint and OneDrive for Business treat a file rename as a metadata change, not a content change. When you rename a file, SharePoint creates a new version entry to record the new file name. At the same time, it retains the previous version entry that contains the old file name. Both entries share the same modification date and user because no actual content was modified. This design ensures that the file name history is preserved for audit and recovery purposes.
The version history page displays two rows for the same point in time. The first row shows the version before the rename, and the second row shows the version after the rename. The file size and content checksum remain identical between the two entries. This is the expected behavior, not a bug. Microsoft introduced this behavior in SharePoint Online to align with the way the underlying file system tracks metadata changes.
How Version History Stores File Names
Each version in SharePoint stores the file name as part of the version metadata. When you rename the file, the current version is closed with the old name, and a new version is opened with the new name. The version number increments by one. For example, if the file was at version 3.0 before the rename, after the rename it becomes version 4.0. Both versions 3.0 and 4.0 show the same timestamp because the rename operation completes in a single transaction.
When Duplicate Entries Appear
Duplicate version entries appear only when you rename a file that has existing version history. If you rename a newly uploaded file with no prior versions, only one version exists and no duplicate is visible. Duplicate entries also appear when you move a file between folders within the same document library, because a move is treated as a metadata update.
Steps to Verify and Manage Version History After a Rename
Follow these steps to confirm that the duplicate entries are caused by a rename and not by an actual content conflict.
- Open the version history page
Navigate to the document library where the file is stored. Select the file and click the three dots (ellipsis) to open the context menu. Choose Version history. The version history panel opens on the right side of the screen. - Identify duplicate entries
Look for two consecutive versions with the same date, same time, and same modified by user. The file size shown for both entries will be identical. The version numbers will be sequential, such as version 3.0 and version 4.0. - Check the file name in each version
Click the down arrow next to each version entry and select View. The file opens in preview mode. Compare the file name displayed in the browser tab or the address bar. The older version shows the previous file name, and the newer version shows the current file name. - Compare file content checksums
Download both versions to your computer. Open the file properties and check the file size. If the sizes match exactly, the content has not changed. You can also use a checksum tool like PowerShell’sGet-FileHashto confirm the SHA256 hash is identical for both versions. - Use the audit log to confirm a rename event
Go to the SharePoint admin center. Select Audit under the Policies section. Search for file rename events by selecting File renamed from the activity list. Enter the file name and date range. The audit log shows the old and new file names, confirming the rename operation.
If the Version History Still Shows Confusing Entries
In some cases, the version history may show more than two entries for a single rename. This can happen when a rename triggers additional operations such as co-authoring conflicts or synchronization delays.
Version History Shows Three or More Entries for One Rename
This occurs when the file is open in the Office desktop app or when a co-author is editing the file at the exact moment of the rename. SharePoint creates additional version entries to capture the concurrent changes. To resolve this, ask all users to close the file before renaming. After the rename, check the version history again. If extra entries remain, use the Delete option in the version history panel to remove unwanted versions. Select the version you want to remove, click the down arrow, and choose Delete. Confirm the deletion.
Duplicate Entries Appear After a Move Operation
Moving a file to a different folder within the same document library also creates two version history entries. This is because the file path is part of the version metadata. The same fix applies: verify the content checksums and delete the extra version if needed. Moving a file to a different library or site does not preserve version history at all. In that case, no duplicate entries appear because the version history is lost during the move.
Sync Client Shows Duplicate File Names
The OneDrive sync client may show duplicate files after a rename if the sync process has not finished. This is a sync state issue, not a version history issue. Wait for the sync client to process the rename. If duplicates persist, pause and resume sync from the OneDrive system tray icon. Right-click the OneDrive icon in the taskbar, select Pause syncing for 2 hours, then select Resume syncing.
| Item | Rename in Same Library | Move to Different Library |
|---|---|---|
| Version history preserved | Yes, with duplicate entries | No, version history is lost |
| Number of version entries created | Two entries with same timestamp | One entry after move (no prior history) |
| Content checksum between entries | Identical | Not applicable |
| Audit log event type | File renamed | File moved |
Understanding how SharePoint handles file renames in version history helps you avoid confusion when reviewing past changes. The duplicate entries are intentional and do not indicate a problem with the file or the library. You can safely ignore the extra entry or delete it if it interferes with your version management workflow. For libraries with strict version control requirements, consider using a naming convention that minimizes the need for renames. Train users to rename files only when the file is not open in any application and when no co-authors are editing.