Forum Discussion
Check where the documents are linked
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
Official Documentation: https://support.microsoft.com/en-us/office/rename-a-file-folder-or-link-in-a-document-library-bc493c1a-921f-4bc1-a7f6-985ce11bb185#:~:text=Open%20the%20document%20library%20and,field%2C%20and%20then%20click%20Save.
So I think now answer of second question is not required 🙂
Hope it will helpful to you.
- Ashwin_CHAug 10, 2022Copper ContributorThank 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.- kalpeshvaghelaAug 10, 2022Steel Contributor
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.
It will even update URL if you have added this document somewhere as Link in document library as shown in below screen.
Hope it will helpful to you. Please mark previous answer and like it if it works for you.