举报
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI **** #EndRegion ;**** 参数创建于 AutoIt3Wrapper_GUI **** $search = FileFindFirstFile(@DesktopDir&"\*.lnk") ; 检查搜索是否成功 While 1 $file = FileFindNextFile($search) $cut = FileGetShortcut(@DesktopDir & "" & $file) ;获取桌面快捷方式的属性 If @error Then ExitLoop If FileExists($cut[0]) Then ;如果目标快捷方式的文件存在 MsgBox(4096, "File:", $file) MsgBox(4096, "CUT:", $cut[0]) EndIf WEnd ; 关闭搜索句柄 FileClose($search) ; 搜索桌面没用的快捷方式,并且提示!
$search = FileFindFirstFile(@DesktopDir & "\*.lnk") While 1 $file = FileFindNextFile($search) $cut = FileGetShortcut(@DesktopDir & '\' & $file) ;获取桌面快捷方式的属性 If @error Then ExitLoop If FileExists($cut[0]) Then ;如果目标快捷方式的文件存在 ;MsgBox(4096, "File & CUT:", $file & @CRLF & $cut[0]) Else MsgBox(4096, "Error:", '"' & $file & '" 指向的文件: "' & $cut[0] & '" 不存在 ' & @CRLF & '点击确定删除此快捷方式 ') ;FileDelete(@DesktopDir & '\' & $file) EndIf WEnd FileClose($search); 关闭搜索句柄
查看全部评分
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-3-2 01:07 , Processed in 0.181822 second(s), 24 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.