Looking for: Dead Shortcut/Link (.LNK) Finder

  1.    22 Mar 2017 #1

    Looking for: Dead Shortcut/Link (.LNK) Finder

    Does anyone know of an app/script to:
    1. scan whole folder/drive
    2. find all files ending in .lnk (i.e. shortcuts)
    3. if the thing that it's pointing to does not exist -> alert me / flag it / delete it / etc

    I'll continue searching online, but I must not be using the right keywords or it's hard to find.
      My ComputerSystem Spec

  2.    22 Mar 2017 #2

    You could copy/paste this into powershell. It will make a file MissingTargets.txt on your desktop containing shortcuts where the target doesn't exist. Just need to change the drive letter D:\ in the first line.
    $Shortcuts = Get-ChildItem -Recurse "D:\" -Include *.lnk
    $Shell = New-Object -ComObject WScript.Shell
    foreach ($Shortcut in $Shortcuts)
    	$Properties = @{
    	ShortcutName = $Shortcut.Name
    	Path = $Shortcut.FullName
    	ShortcutDirectory = $Shortcut.DirectoryName
    	Target = $Shell.CreateShortcut($Shortcut).targetpath
    	New-Object PSObject -Property $Properties
    	if (-not (Test-Path $Properties.Target)) {$Properties.Path>>$env:homeDrive$env:homePath\Desktop\MissingTargets.txt} 
    If you wanted to delete them instead of reporting them then change the line at the end from
    if (-not (Test-Path $Properties.Target)) {$Properties.Path>>$env:homeDrive$env:homePath\Desktop\MissingTargets.txt}
    if (-not (Test-Path $Properties.Target)) {Remove-Item $Properties.Path -Force -ErrorAction 0}
    Based on this code [Powershell] Get Shortcut Target : AskGreg
      My ComputerSystem Spec

  3.    22 Mar 2017 #3

    This is pretty good:
    Fix Shortcuts - Scan and Fix broken shorcuts on you computer
    That states Win 10 compatible. Freeware for personal use.
    Click image for larger version. 

Name:	FixShortcuts.jpg 
Views:	1 
Size:	83.9 KB 
ID:	126162
    Older tool here:
    Search, Identify And Resolve Broken Shortcuts
    (not tried)

    (Searched for "detect scan for dead shortcuts")
    Attached Thumbnails Attached Thumbnails Snap 2017-03-22 at 08.05.49.jpg  
    Last edited by dalchina; 22 Mar 2017 at 03:32.
      My ComputerSystem Spec


Related Threads
Tray Icon link for shortcut in General Support
Hi, everyone This little one want to ask some weird questions. Just as the thread say, yes i know it's weird to have this question, but i really need it so for anyone who know what the link of all of this tray icon list -battery -wifi
Shortcut for amazon........ How do you create a shortcut for Amazon.com ? I use Amazon to buy stuff (usually books), but I also use them for reviews and learning about a product. I am using it more than ever now and I thought it would be...
"check for updates" is a dead link in Windows Updates and Activation
when I click on search and type "check for updates", or "windows updates settings", I can't open the result. I click, and nothing happens. But if I go to "settings", and then to "update and security", it opens just fine. What is the matter with...
Hi, I want to add shortcut link of one of the folder location to "Quick Access" in Windows 10 x64. In the case of Windows 10 x86 I used to put my shortcut link in the folder "C:\Users\user_name\Links" & it showed me shortcut in favorites...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:35.
Find Us