Skip to content

Instantly share code, notes, and snippets.

@yannxou
Created December 12, 2014 10:43
Show Gist options
  • Save yannxou/c75de607e8715f5a9f54 to your computer and use it in GitHub Desktop.
Save yannxou/c75de607e8715f5a9f54 to your computer and use it in GitHub Desktop.
AppleScript: Display a list with all files in Desktop
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment