我在文件系统中使用了很多别名。许多原始文档都放在全局存储库中,我通过分组在“标签”文件夹中的别名来访问它们。因此,当我需要删除这样的文档时,我需要检查多个标签文件夹以删除别名,这很麻烦。
是否有一个应用程序可以检查 Finder (或最好是特定文件夹) 中损坏的别名?提前致谢。
答案1
尝试在 AppleScript 编辑器中运行如下命令:
set l to {}
tell application "Finder"
try
alias files of entire contents of (POSIX file "/Users/username/Folder/" as alias)
-- zero aliases results in an error, one alias is not returned as a list
result as list
on error
return
end try
repeat with f in result
try
original item of contents of f
on error
--move contents of f to trash
set end of l to POSIX path of (f as text)
end try
end repeat
end tell
set text item delimiters to linefeed
l as text
答案2
使用应用程序阿里菲克斯作者:霍华德·奥克利。