Alas, you are wrong.
Here are the annoying values with your script :
/Volumes/Macintosh HD/Users/Important/D80… alias /Volumes/Western 2/D80…
/Volumes/Macintosh HD/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/AppleScript Editor/Target Application Alias
/Applications/Utilities/AppleScript Editor.app
/Volumes/Macintosh HD/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/Pages/Target Application Alias
/Applications/iWork '09/Pages.app
/Volumes/Macintosh HD/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/Numbers/Target Application Alias
/Applications/iWork '09/Numbers.app
/Volumes/Macintosh HD/Users/??????????/Library/Application Support/PDF Nomad/URLBookmarks/D9B0C587-2F86-446B-952D-F2116A5B5DE7_bookmark.alias /Users/??????????/Desktop/essai (Demo).pdf
/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/Numbers/Target Application Alias
/Applications/iWork '09/Numbers.app
And here are the lines returned by the completed script.
/Volumes/Macintosh HD/Users/Important/D80… alias /Volumes/Western 2/D80…
/Volumes/Macintosh HD/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/AppleScript Editor/Target Application Alias¶ /Applications/Utilities/AppleScript Editor.app
/Volumes/Macintosh HD/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/Pages/Target Application Alias¶ /Applications/iWork '09/Pages.app
/Volumes/Macintosh HD/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/Numbers/Target Application Alias¶ /Applications/iWork '09/Numbers.app
/Volumes/Macintosh HD/Users/??????????/Library/Application Support/PDF Nomad/URLBookmarks/D9B0C587-2F86-446B-952D-F2116A5B5DE7_bookmark.alias /Users/??????????/Desktop/essai (Demo).pdf
/Users/??????????/Library/Speech/Speakable Items/Application Speakable Items/Numbers/Target Application Alias¶ /Applications/iWork '09/Numbers.app
In fact there were six broken alias with the ending returns but I zipped 2 of them to try to see if they are really useful at this time.
It seems that they aren’t useful but I play safe.
I turn the occasion to account that I missed something in a Shane’s proposal.
He carefully added some words at the mdfind instruction.
His version was :
set allAliasFiles to (do shell script "mdfind \"kMDItemKind == 'Alias'\"" without altering line endings)
Thanks to “without altering line endings” the ending return characters were no longer dropped.
Yvan KOENIG running Sierra 10.12.6 in French (VALLAURIS, France) vendredi 28 juillet 2017 10:20:02