Forum Discussion

WayneKark's avatar
WayneKark
Copper Contributor
Dec 15, 2023

Editing or updating URL of link file saved in Sharepoint document library

I have a modern Sharepoint document library in which I have created a lot of links to pages on external websites. I have been trying to find a way to edit/update the URL of those links without losing the metadata. There does not appear to be any way of doing this directly in Sharepoint, short of deleting the link (and all its metadata) and creating a new link 

 

I have found and tried a couple of suggested solutions online: 

  • Sync or download the link file to a local folder, edit the URL for the shortcut file in Windows, and then resync/upload to Sharepoint overwriting the original file 

  • Use PowerAutomate (Update File operation) to change the URL by updating the link file contents

 

I have used both methods, and in both cases appear to successfully update the file content of the shortcut/link file, but the updated file doesn't work in Sharepoint. If I download the updated link file and open it on my desktop, the shortcut works perfectly, directing me to the updated URL. However, opening the updated link directly in Sharepoint takes me to the original URL. It doesn't make sense to me that the same file behaves differently depending on whether it is opened in Sharepoint or on the desktop.

 

Can anybody explain what is going on, and how I go about fixing this?

9 Replies

  • mafu's avatar
    mafu
    Copper Contributor

    FYI - Response from Microsoft Support 

    In a SharePoint on-premises environment, the vti_shortcuturl property contains the URL value of an item. However, this value does not update when the file is replaced. This behavior was previously logged as a bug but rejected because the URL is considered content, not a property. Since replacing a file doesn’t change its content, the URL remains unchanged. Additionally, SharePoint lacks a URL editor to modify this value directly, making it unlikely for this issue to be accepted as a new bug.

     

    Steps Taken to Reproduce the Issue:

    1. Added a link in the document library, creating an item with the .url extension.
    2. Created a link item named "Google," pointing to www.google.com.
    3. Created a shortcut file in File Explorer with the same name, "Google," but pointed the URL to a different address (e.g., www.youtube.com).
    4. Uploaded the File Explorer shortcut to the same document library, which prompted a message that a file with the same name already exists.
    5. Selected the option to replace the existing file with the new one.
    6. Expected behavior: Replacing the file should redirect to www.youtube.com.
    7. Actual behavior: The file still redirected to the old reference, www.google.com.

     

    Observations:

    • Versioning was enabled in the document library. Upon reviewing version history:
    • Repeated similar steps independently with identical results.
    • Tested replacing the .url file through the browser to rule out File Explorer or OneDrive issues; the same behavior persisted.
    • Observed the same issue in both modern and classic SharePoint experiences.
    • The Edit Properties option for the URL item did not display the link or URL it redirects to.
    • Tested on SharePoint On-Premises 2019 and SharePoint Subscription Edition (SPSE), reproducing the same behavior.
    • OkiDoki247's avatar
      OkiDoki247
      Copper Contributor

      We just ran into this this morning. We have nearly 100 links that need to be changed, and we cannot edit them.  The amount of work required to redo all of the titling and meta-data is frustrating, and this functionality seems like a no-brainer since you can edit everything else.  Microsoft - can you please check into this?

      • ALVT's avatar
        ALVT
        Copper Contributor

        I encounter this all the time.  I have to update URL links in our SharePoint database and I always have to recreate the file every time the URL changes.  It's baffling that no one's considered this an important feature.

  • cpala01's avatar
    cpala01
    Copper Contributor
    We have also noticed this behaviour. The fact you can download the file and it opens perfectly doesn't lend to the view that this is by design. It feels like a bug.

    Regardless, I have submitted an idea if anybody wishes to upvote it.
    https://feedbackportal.microsoft.com/feedback/idea/8dc61bbc-baf2-ee11-a73d-6045bd7e894e
    • WayneKark's avatar
      WayneKark
      Copper Contributor
      I'm afraid not. Still banging my head against a brick wall.
  • Hello WayneKark 

     

    fully agree, it's a weird behaviour. I have reported this to Microsoft.

     

    I use often the option one, and it works fine. In your case it looks like that the file is not overwritten online. Please check again or delete the file and upload them new.

     

    Best, Dave

Resources