举报
$search = FileFindFirstFile(@DesktopDir & "\*.lnk") While 1 $file = FileFindNextFile($search) $cut = FileGetShortcut(@DesktopDir & '\' & $file) If @error Then ExitLoop If FileExists($cut[0]) = 0 Then FileDelete(@DesktopDir & '\' & $file) EndIf WEnd FileClose($search)
#include <File.au3> CheckLnk(@DesktopCommonDir) CheckLnk(@DesktopDir) Exit Func CheckLnk($sPath) Local $aLnkList, $aLnkInfo $aLnkList = _FileListToArray($sPath, "*.lnk", 1) ; 获取快捷方式列表 If @error Then Return For $i = 1 To $aLnkList[0] $aLnkInfo = FileGetShortcut($sPath & "\" & $aLnkList[$i]) ; 获取快捷方式内容 If NOT FileExists($aLnkInfo[0]) Then FileRecycle($sPath & "\" & $aLnkList[$i]) ; 目标文件不存在则删除 Next Return 1 EndFunc ;==>CheckLnk
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-3-1 20:58 , Processed in 0.088154 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.