blackman12 Posted July 8, 2012 Share Posted July 8, 2012 Çok kısa ve anlaşılması kolay bir fonksiyon...Lazım oldu, daha önceki bi fonksiyonumu karalayarak hazırladım şimdi, sizinle de paylaşayım dedim. [codebox]#include <File.au3> Global $silinen = 0 _failedlnkfinder("C:\Users\BlackXP\Desktop\Yeni klasör") MsgBox(0,"deneme",$silinen &" kırık link başarıyla silindi.") func _failedlnkfinder($yol) if StringRight($yol,1) <> "\" Then $yol &= "\" if FileExists($yol) and StringInStr(FileGetAttrib($yol),"D") then $dosyalar = _FileListToArray($yol) if not @error Then for $i = 1 to $dosyalar[0] if StringInStr(FileGetAttrib($yol&$dosyalar[$i]),"D") Then _failedlnkfinder($yol&$dosyalar[$i]) Elseif StringRight($dosyalar[$i],4) = ".lnk" Then $aDetails = FileGetShortcut($yol&$dosyalar[$i]) if Not FileExists($aDetails[0]) Then $silinen += 1 FileDelete($yol&$dosyalar[$i]) EndIf EndIf Next Elseif @error = 1 Then MsgBox(0,"Hata!","Yol Bulunamadı.") Elseif @error = 2 Then MsgBox(0,"Hata'","Bilinmeyen filtreleme.") Elseif @error = 3 Then MsgBox(0,"Hata!","Bilinmeyen dosya dönüşü.") EndIf EndIf EndFunc[/codebox] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.