Check where the documents are linked

Copper Contributor

I wanted to know, if there is a way to replace all the .doc files with .docx at once.
If there is a way, will that break the link if those pages are linked.

Second Question: 
Is there a way to see where a specific document/file is linked, so that we can manually go and link new .docx file. 

3 Replies

@Ashwin_CH 

 

SharePoint will take care about it so link will be automatically updated when you rename any document. (Of course, if you have sent direct document link (Absolute URL) separately to anyone or some have bookmarked with Absolute URL then it will not work)

 

CSOM - PowerShell Reference -> How you can renamed document

 

https://morgantechspace.com/2016/09/how-to-rename-document-in-sharepoint-powershell.html#:~:text=The...

 

Official Documentation: https://support.microsoft.com/en-us/office/rename-a-file-folder-or-link-in-a-document-library-bc493c...

 

So I think now answer of second question is not required 🙂

 

Hope it will helpful to you.

Thank you. This will help to rename the file name.
However, i would like to update the the extension of a file. From .doc to .docx, without having them to unlink from linked pages.
example:
I have file A which is fileA.doc and is linked somewhere in the site.
Now the .doc file is outdated and I want fileA.doc to be converted to fileA.docx, without unlinking them.

@Ashwin_CH 

 

That's what I have mentioned, It will update links automatically even if you update only extension of the file.

 

I have also validated it in my environment and working fine. See below screen shot where initially I have added link for my document with doc extension and then I have updated extension via PowerShell and now link is pointing to new URL with docx. 

 

kalpeshvaghela_0-1660115783354.png

 

It will even update URL if you have added this document somewhere as Link in document library as shown in below screen.

 

kalpeshvaghela_1-1660115876542.png

 

 

Hope it will helpful to you. Please mark previous answer and like it if it works for you.