How to Restore SharePoint Folder Names After Moving Files
Question details
The user needs to recover the original names of SharePoint folders that were automatically altered with a tmp_ prefix and random names during a file move.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Moving folders and files between different SharePoint sites or locations.
- Observed behavior
- Folders were unexpectedly renamed with a tmp_ prefix, child folders received random character names, and no version history is available to revert the changes.
Ensure you have Site Owner or Administrator permissions for both the source and destination SharePoint sites to access the First-Stage and Second-Stage Recycle Bins.
Recover Original Folders from the SharePoint Recycle Bins
When content is moved between SharePoint Online sites, the original files are usually placed in the source site's Recycle Bin. Restoring them can help you recover the original folder structure and names.
The tmp_ prefix and random folder names are not expected behavior when moving files in SharePoint. To bypass this bug, you can check if the original, unmodified folders still exist in the site's deletion logs.
Navigate to the original SharePoint site (Site A) where the folders were initially located. On the left navigation pane, click on 'Recycle bin'.
Look for the folders with their original names. If you find them, select the checkboxes next to the items and click 'Restore' at the top of the page.
If the folders are not in the first-stage Recycle Bin, scroll to the very bottom of the Recycle Bin page and click the 'Second-stage recycle bin' link. Look for the missing folders here and restore them.
If the folders are still missing, repeat the exact same Recycle Bin and Second-Stage Recycle Bin checks on the destination SharePoint site (Site B).

Open a Microsoft 365 Support Ticket
If the original folders are completely missing from all Recycle Bins, the unexpected renaming is likely a backend synchronization glitch that requires Microsoft's intervention.
Try WPS Office for Seamless Document Management
While resolving complex SharePoint synchronization bugs and folder issues, you need a stable, lightweight, and reliable tool to edit your downloaded documents. WPS Office is a powerful free alternative to Microsoft Office, offering full compatibility with Word, Excel, and PowerPoint files without the heavy resource usage.
- 1. Download the Application: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the on-screen prompts to complete the installation.
- 3. Open Your Documents: Launch WPS Office and directly open any downloaded SharePoint documents to continue working offline seamlessly.

Frequently Asked Questions
Can I use version history to restore SharePoint folder names?
No. In SharePoint, version history is primarily designed to track modifications made to individual files. It does not track changes to folder structures or folder names.
Why do SharePoint folders get a tmp_ prefix when moved?
This is an unexpected behavior or bug within SharePoint Online's synchronization and moving processes. Normally, moving folders transfers them with their exact names or places the original files in the source site's Recycle Bin.
How long does SharePoint keep deleted folders in the Recycle Bin?
SharePoint Online retains deleted items in the Recycle Bins for 93 days. This 93-day window starts from the exact time you delete the item from its original location, and covers both the first-stage and second-stage recycle bins combined.




