esas Posted March 10, 2005 Share Posted March 10, 2005 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! Link to comment Share on other sites More sharing options...
dman Posted March 11, 2005 Share Posted March 11, 2005 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now