Jump to content

Find And Delete Broken Shortcuts


Recommended Posts


Hi esas,

I will try not to take the fun out of it for you.

You already have the code that finds the links and extracts their targets.

This code determines if a file exists.....

Dim objFSO, flname
flname = "c:\test.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists (flname) Then
  msgbox "File exists"
Else
  msgbox "File does not exist"
End If

and this code deletes a file...

objFSO.DeleteFile (flname)

so... get the link name, check if the target file exists, if not delete the link. 1-2-3

have fun

post again if you still have questions

dman

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...