Forum Discussion
Deleted SharePoint folders keep reappearing
I know this is an old post, and no real solution to it, so Im posting my similar experience and how I fixed the problem.
A SharePoint folder restructuring happened at my client, which also resulted in deleted folders reappearing with the folder name and computer name tagged.
There was a folder (ABC.123) and the client wanted the name to be only (ABC), but instead of renaming the current folder, they created the folder (ABC) and copied the content from (ABC.123) to (ABC). This change synchronized to all users who were online at the time, which is normal behavior.
Somewhere between copying the data they realized it took too long and it would be much easier to just rename the folder (ABC.123) to (ABC), so they cancelled the copy mid operation.
The folder (ABC) was deleted, and the folder (ABC.123) was renamed to (ABC). For users who were online at the time, this was not a problem and the changes in the folder structure reflected perfectly. It is worth noting that the decision to cancel the copy was taken quite late the afternoon when most of the users were offline.
When a test user logged on to confirm the changes, all of a sudden there was a new folder called (ABC - computer name1) which contained the data that was in the original (ABC) folder that was previously deleted on SharePoint, as well as (ABC) which contained the data of (ABC.123). When a second and third test user logged on, two more folders were created (ABC - computer name2) and (ABC - computer name3).
It became evident that there was some sort of sync issue, and I was called to investigate.
The problem I found was with the renaming of the folders during a time when users were offline.
When a user who was offline at the time of the change came online, the OneDrive sync app would run and start with the sync instructions.
The sync instructions were simple
1. Rename (ABC.123) to (ABC)
2. Remove the old (ABC) folder
When the sync app tried to rename (ABC.123) to (ABC), Windows found that there was already a folder called (ABC) in the same location on the uses device, and this is not allowed, so Windows renamed the current (ABC) folder on the users laptop to (ABC - computer name 1).
Once the folder was renamed, the sync app was able to rename (ABC.123) to (ABC)
Next instruction was to remove the old (ABC) folder, however this folder does not exist anymore as it was renamed, so the instruction was ignored.
The sync app would now see that there is a new folder (ABC - computer name 1) on the users computer which is not in SharePoint. Default sync behavior would cause this folder to be copied to SharePoint.
This repeated on the second and third user devices as well.
To solve the problem, I deleted the folders (ABC - computer name 1); (ABC - computer name 2) and (ABC - computer name 3) form SharePoint, and renamed the folder on SharePoint from (ABC) to (ABC1).
So the sync instructions would be
1. Rename (ABC.123) to (ABC1)
2. Remove (ABC)
Got some more test users to logon and no more (ABC - computer name x) folders were created, and the changes on SharePoint reflected on their devices as expected
Once all users have come online again, and fully synced with SharePoint, can I rename the folder (ABC1) to (ABC) as was intended.