Hyperlinks do not work after move from shared drive to Sharepoint site

DannyVB 21 Reputation points
2023-01-09T16:42:00.837+00:00
  • MY SHARED DRIVE
    I have files on an on-site server shared drive (Z:) with subdirectories A, B, etc...
    On the root directory of Z, I have an html file "Table_of_Content.html" with hyperlinks pointing to the various files.
    The hyperlinks in html are of the form "file:A/filename_x.docx"...
    Hence they are local / relative hyperlinks (if you would move the whole tree to another shared drive the links still work)
  • MY SHAREPOINT SITE
    https://MYCOMPANY.sharepoint.com/sites/Documents/Q4
  • MOVE from shared drive to sharepoint
    I synced the SPOL library "Q4" to my PC following instructions in
    https://support.microsoft.com/en-us/office/sync-sharepoint-files-and-folders-87a96948-4dd7-43e4-aca1-53f3e18bea9b
    In file explorer I see a shared folder : MYCOMPANY/Q4
    I copied all files (including subdirectories A, B etc) from shared drive Z: to the Q4 directory
    They show up in SPOL in under Q4. OK
  • HYPERLINKS not working
    In the html file on the SPOL Q4 directory the Link "file:A/filename_x.docx" does not work anymore.
    Based on https://learn.microsoft.com/en-us/answers/questions/1136629/files-move-from-on-server-shared-drive-to-sharepoi.html
    I changed the hyperlink to "https://MYCOMPANY.sharepoint.com/sites/Documents/Q4/A/filename_x.docx"
    -> It still does not work if I left-click on the hyperlink
    -> It works if I right-click "Open link in new tab" (albeit after a window "Open this file?" > ok > window "requested content uses a sign-in method that may be insecure" > ok)
    -> It works if I copy the link and paste it in the web-browser (albeit after a window "Open this file?" > ok)
  • MYQUESTION: How can I make that my users can open the hyperlinks with left-click only? Remark: this server has several thousands of files, therefore any manual / non-automatized method is not workable.
Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

Accepted answer
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2023-01-10T09:08:23.607+00:00

    Hi @DannyVB , The documents referenced by the hyperlinks have been migrated from the local drive to the SharePoint site,because the webpage cannot read your local file path,so the original hyperlinks are bound to fail, unfortunately, you need to manually update hyperlinks to new path of documents. I deeply regret this. Thank you for your understanding and support. I did the test as you described,I have an html file with hyperlinks pointing to the various files move from shared drive to sharepoint. Then correct the hyperlink. It is exactly as you describe: you need to "Open link in new tab" or paste it in the web-browser. Sorry for the bad experience. You could make your suggestion in this feedback portal to improve user experience.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.