Add Shortcut to OneDrive still deleted SharePoint Online files

Brass Contributor

Hi all,

 

I am here to report something very alarming. I did an "Add shortcut to OneDrive" to three of our SharePoint Online sites that belongs to one Major Project. I moved the three shortcuts into a folder called "SWA" which is the name of the Major Project.

 

The sites had over 100,000 files so I could see OneDrive desktop app was struggling. At first things were going okay, but then errors such as "file path too long" etc started to occur, and I was fixing them one by one:

 

MichaelDelpach_2-1656628324902.png

 

Same page from onedrive.com:

MichaelDelpach_0-1656629087051.png

 

As you can see the one that has a red cross lost its shortcut icon in the folder. That was very strange!

 

MichaelDelpach_0-1656628198890.png

 

As you see here, I may have added a shortcut again somehow to the root of "My files" in OneDrive, which also has lost its shortcut icon.

 

I was confident that they were not linked directly to the SharePoint Online site - I mean how can they!?

 

I started deleting this duplicate folder in my OneDrive  My files. Next day I started getting deletion notifications which I had setup on my SharePoint Online site.

 

20220701_ceV8PSoige

This is disastrous. How can this be possible. 

 

Questions:

1/ How can a shortcut turn into a folder?

2/ How can that folder in my OneDrive be linked to SharePoint Online?

 

Edit:

 

Another thing I have noticed is, the folders I have deleted, keep coming back:

MichaelDelpach_0-1656632195938.png

 

 

15 Replies
You can create a Sharepoint folder link now that appears in OneDrive rather than as a separate SharePoint set of folders. Look at your SharePoint online site and you will see this option next to Sync. It's distinct from pinning a shortcut to your OneDrive Quick Access list.

That linked folder is just as much a synced folder as any other so if you delete its contents (as opposed to removing the link) then you delete the content. That is how cloud storage syncing works!
I added a shortcut to "Documents - C115.15 SWA" folder. My point is, OneDrive somehow changed this shortcut to a linked a folder within my OneDrive. When a user deletes a shortcut, it will not impact the SharePoint Online site.
1. How did you add the shortcut?
2. What does "I was fixing them one by one:" entail?
Hi Mike,

I added the shortcut by going to each SharePoint Online site and pressing the "Add shortcut to OneDrive" button in the relevant Shared Document.
When OneDrive desktop app was syncing files, I began to get errors such as file path too long, so I was fixing them one by one - by renaming them to shorter file names.

Regards,
Michael
Yes, it seems that you did exactly as I described: by creating a shortcut to SharePoint content in OneDrive you are syncing the folder.
https://support.microsoft.com/en-us/office/add-shortcuts-to-shared-folders-in-onedrive-for-work-or-s...
"I was confident that they were not linked directly to the SharePoint Online site - I mean how can they!?" The feature is that they ARE linked directly to the SharePoint Online site.


@Mike Williams deleting the Shortcut folder must not delete the contents in the SharePoint Online site. That's the whole point of the Shortcut. 

No it isn't. You must distinguish between DELETION and UNLINKING or clearing space. If you DELETE synchronised objects, you delete them everywhere.

If you want to remove the shortcut, right-click and choose "Remove shortcut". Deleting it does exactly what it's supposed to and what you've witnessed.


That's not true. I deleted the entire folder (Shortcut folder) using my Work PC, and there was nothing deleted from the SharePoint Online Shared Documents. Above is my Home PC, and definitely something wrong happened.

 

I performed the exact operation using my Work PC. In File Explorer, I deleted the Shortcut. The shortcut got deleted. No impact in SharePoint Online. 

 

The day before that, I deleted the Shortcut using my Home PC in File Explorer. There were some files deleted in SharePoint Online and as I said the shortcut icon had disappeared as well. Please check my screenshots in my original post. There was definitely an anomaly which I can't explain. 

Your screenshots don't show enough information. If your work files were not online only then they won't be deleted (there's a message stating this unless you've disabled this). It's impossible to tell the sync state of your different situations. You need to familiarise yourself with this feature as I have dealt with so many people who delete SharePoint files when they meant to clear space or unsync.

 

I just ran tests with a shortcut folder - deleting the linked folder deleted the files as expected.

@Mike Williams 

I am very much familiar with OneDrive, SharePoint Online and Teams.

My screenshots provided sufficient information to familiarise with the issue.

For instance, using this screenshot: https://mike.getsharex.com/2022/07/20220703_msedge_slJHm4PwN4.png

You can see that the folder path starts with My files. This means you can see where the screenshot is taken from. I am on my OneDrive, and not in SharePoint Online.

 

You can then see there are three folders:

  • Documents – C115.15 Procurement (with shortcut icon)
  • Documents – C115.15 Smart Freeways (with shortcut icon)
  • Documents – C115.15 SWA (no shortcut icon)

Having no shortcut icon is bizarre for the third folder because I added these three shortcuts in identical manner from SharePoint Online. The third folder encountered errors when OneDrive app was syncing. This was due to long file paths as mentioned earlier. The shortcut icon disappeared after that. This was the anomaly.

I also did a test by creating another shortcut folder. Deleting the shortcut folder did not delete the folder from SharePoint Online site as expected. Here is a screencast:

https://mike.getsharex.com/2022/07/20220703_58Q3qb9iYf.mp4

Furthermore, there is a Microsoft article agreeing with my observations:

https://mike.getsharex.com/2022/07/20220703_msedge_Toy8gPLlPp.png

https://support.microsoft.com/en-us/office/add-shortcuts-to-shared-folders-in-onedrive-for-work-or-s....

I have spent considerable time responding to your replies unfortunately with no positive outcome. If you have no solution to offer, I kindly request you to invest your time elsewhere in this forum and preclude yourself from having misassumptions with my issue.

Thanks,

Michael

 

 

 

"My screenshots provided sufficient information to familiarise with the issue.

For instance, using this screenshot: https://mike.getsharex.com/2022/07/20220703_msedge_slJHm4PwN4.png"

Screenshots provided omit the critical detail of displaying the sync state of local files.

The location of My Files is also irrelevant.

However the Microsoft article you reference agrees with what I said "
"To remove a shared folder on OneDrive.com:

In the My files view, select the shared folder you want to remove.

Select Remove shortcut.

This only removes the folder from your OneDrive - it's still accessible from your Shared list and doesn't affect the owner or anyone else sharing the folder. If you delete the folder instead, it's deleted from everyone's OneDrive and the folder owner would have to restore it."

Please take note of the last line.

@Mike Williams I suggest you re-check my very first post. The very first screenshot has the sync status: https://techcommunity.microsoft.com/t5/onedrive-for-business/add-shortcut-to-onedrive-still-deleted-...

 

I reconfirm that my file operation (action of deleting) was the same whether or not I deleted it from onedrive.com or File Explorer. Here is another screencast of the same scenario, but this time deleting the folder through File Explorer: https://mike.getsharex.com/2022/07/20220703_I7chGcVyiY.mp4

 

You will see that OneDrive app treats it as removing the shortcut, even if we chose Delete. So in other words, if OneDrive app sees the folder as a Shortcut Folder, then there is no harm done. You cannot accidentally delete the contents of the folder from SharePoint Online site.

 

The danger is if OneDrive app faces an anomaly and cannot see it as a Shortcut Folder, as I have repeatedly shown, the third folder does not have a Shortcut Icon. That's bizarre when that folder was added as a shortcut just like other two folders. 

I know this might not be helpful, but I want to say that this technology is certainly not without flaws, they claim all kinds of benefits, and advantages for organizing & securing data for corporate/business users, but there are so many problems, and errors we encounter.
Thanks Mike,

What we learnt the hard way is that it is best not to add shortcuts to established SharePoint Online sites because of possible long file paths which causes OneDrive to exit unexpectedly and lose sync status. It's best to use it on new sites/Teams channels.

Best regards,
Michael