March 10, 200521 yr Hi!I need a script that searches, finds and deletes broken shortcuts.I have no experiene with scripting and really need some help.I've figured out I've got to use Win32_Shortcutfile.... ...I ThinkThis link might help..http://www.microsoft.com/technet/scriptcen...04/hey1208.mspxThanks!
March 11, 200521 yr 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, flnameflname = "c:\test.txt"Set objFSO = CreateObject("Scripting.FileSystemObject")If objFSO.FileExists (flname) Then msgbox "File exists"Else msgbox "File does not exist"End Ifand 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-3have funpost again if you still have questionsdman
Create an account or sign in to comment