{"id":254,"date":"2021-02-04T23:35:00","date_gmt":"2021-02-04T23:35:00","guid":{"rendered":"https:\/\/ghothi.co.uk\/?p=254"},"modified":"2025-05-26T12:24:29","modified_gmt":"2025-05-26T12:24:29","slug":"fixing-broken-sharepoint-links","status":"publish","type":"post","link":"https:\/\/ghothi.co.uk\/?p=254","title":{"rendered":"Fixing Broken SharePoint Links"},"content":{"rendered":"\n<p>If you&#8217;ve ever worked with SharePoint, you\u2019ve probably seen this happen:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full has-custom-border is-style-default\"><img fetchpriority=\"high\" decoding=\"async\" width=\"601\" height=\"250\" src=\"https:\/\/ghothi.co.uk\/wp-content\/uploads\/2025\/05\/2025-05-26_12-38-15.jpg\" alt=\"\" class=\"has-border-color wp-image-255\" style=\"border-color:#abb8c3;border-width:1px;border-radius:0px\" srcset=\"https:\/\/ghothi.co.uk\/wp-content\/uploads\/2025\/05\/2025-05-26_12-38-15.jpg 601w, https:\/\/ghothi.co.uk\/wp-content\/uploads\/2025\/05\/2025-05-26_12-38-15-300x125.jpg 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p>Someone moves a folder. Or renames a file. And now the link doesn&#8217;t work&#8230;<\/p>\n\n\n\n<p>Now you&#8217;re stuck manually going through each folder you think it might be in, hoping you get lucky or can suss out where it might have gone.<\/p>\n\n\n\n<p>This isn&#8217;t a problem when you can just ask the document owner, but half the time, the documents are so old that you have no idea who the owner is or where to start.<\/p>\n\n\n\n<p>The best place most people start is by analysing the URL and trying to find any folder name they recognise and try starting there. <\/p>\n\n\n\n<p>So I built a small Python tool to help.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"751\" height=\"453\" src=\"https:\/\/ghothi.co.uk\/wp-content\/uploads\/2025\/05\/2025-05-26_12-40-16.jpg\" alt=\"\" class=\"wp-image-256\" srcset=\"https:\/\/ghothi.co.uk\/wp-content\/uploads\/2025\/05\/2025-05-26_12-40-16.jpg 751w, https:\/\/ghothi.co.uk\/wp-content\/uploads\/2025\/05\/2025-05-26_12-40-16-300x181.jpg 300w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What It Does<\/h2>\n\n\n\n<p>You paste a SharePoint URL. Click &#8220;Run.&#8221;<\/p>\n\n\n\n<p>It cleans the link (i.e. decodes it back into the format we&#8217;re most common with), breaks it into parts, and shows each folder level as a clickable link, with the last line (the actual file) being struck through to visually indicate it&#8217;s no longer accessible.<\/p>\n\n\n\n<p>You can still click the last working folder and look around &#8211; most of the time, the file has just moved to a subfolder nearby.<\/p>\n\n\n\n<p>No more manually cleaning up the URL, copy-pasting each level into your browser to see what still works, or just plain guessing around. The tool does it for you.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why It\u2019s Safe<\/h2>\n\n\n\n<p>I fully anticipate that some non-technical people may get a bit nervous with pasting sharepoint links anywhere other than their browser.<\/p>\n\n\n\n<p>But to clarify:<\/p>\n\n\n\n<p>This tool does not access, store, or transmit any SharePoint data.<\/p>\n\n\n\n<p>In other words:<\/p>\n\n\n\n<p>This tool doesn\u2019t touch anything. It doesn\u2019t scrape content, query folders, or download files.<br>It doesn\u2019t read from or write to disk.<br>It doesn\u2019t access your network or send data over the internet.<br>It doesn\u2019t connect to SharePoint behind the scenes (there&#8217;s no connection to your SharePoint system, login credentials, or internal APIs).<\/p>\n\n\n\n<p>It just simply <strong>decodes the URL and reconstructs<\/strong> the folder levels locally.<\/p>\n\n\n\n<p>When you click a folder in the interface, it opens that URL in your default browser, just like if you had typed it yourself.<\/p>\n\n\n\n<p>That\u2019s it.<\/p>\n\n\n\n<p>There\u2019s nothing risky here. It\u2019s just automating what we already have to do when dealing with broken links manually, it just does it faster and smarter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why I Built It<\/h2>\n\n\n\n<p>Partly out of frustration, but mostly because I like building things that improve efficiency. <\/p>\n\n\n\n<p>I got tired of broken links and guesswork. I wanted something that could show me the structure of a URL and let me jump to the last known good point without wasting time.<\/p>\n\n\n\n<p>This saves me clicks. Saves me effort. And on bigger projects with dozens of links, it adds up.<\/p>\n\n\n\n<p>The tool is built in Python with Tkinter, so it runs as a small desktop app provided you have the prerequisites. I could wrap it up into an .exe and distribute it, but I can imagine a lot of people would have trust issues if they don&#8217;t know how to check the code for themselves, so for now it will just stay as a .py file on my desktop&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve ever worked with SharePoint, you\u2019ve probably seen this happen: Someone moves a folder. Or renames a file. And now the link doesn&#8217;t work&#8230; Now you&#8217;re stuck manually going through each folder you think it might be in, hoping you get lucky or can suss out where it might have gone. This isn&#8217;t a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml-automation","category-civil-engineering"],"_links":{"self":[{"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=254"}],"version-history":[{"count":1,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/254\/revisions\/257"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=\/wp\/v2\/media\/256"}],"wp:attachment":[{"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ghothi.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}