AppleScript tip: the every command

By Alvin J. Alexander, devdaily.com

I've shown examples of the AppleScript every keyword in other posts, so rather than create anything new, here's a repeat of one of those examples:

set listOfNames to {}
tell application "Finder"
  set filelist to every file of the desktop
  repeat with currentFile in filelist
    set currentFileName to (the name of currentFile)
    copy currentFileName to the end of listOfNames
  end repeat
end tell
choose from list listOfNames

devdaily logo