Redirect links on Text web part


If a file is moved to another library or folder, is there a way to automatically redirect or update the links pointing to these files?

For example, we have a Text web part with a link to a file.  When the target file is moved to another location, the link on the Text web part needs to be manually edited.

I'm hoping there's an easier way to automatically update the links? 

5 Replies
I enabled Document ID but now waiting to see how this would work for existing links on web parts. Not sure how long it'll take for me to see the Document ID column in libraries after enabling it though...

HI @Tamras1972 ,

you can also just click the three dots on a document and select "Share"
Now switch the Sharing mode from "People in <tenant> with the link can edit" or whatever to 
select "People with existing Access".

Copy that link.

That link is also durable, so you will have access to that file even if you move the file to a different folder/document library in the same sitecollection.

The "People with existing Access" setting will not change permissions on file.

Best Regards,

best response confirmed by Tamras1972 (Contributor)
I wrote a comprehensive blog post about this about 2 years ago. The guidance still applies:
Thanks. It's the PDF link that are broken after the move but using the path or direct link works and didn't break.
Thanks. Yes, we are using the 'People with existing access' link but the issue is opening the link, via Text webpart, to a blank page after moving the file to another folder. I should have mentioned the links were to PDF files not Office files.