Guest User

Untitled

a guest
Jul 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. set someFolder to path to applications folder
  2.  
  3. do shell script "/usr/bin/mdls -name kMDItemDisplayName -name kMDItemVersion " & quoted form of POSIX path of someFolder & "*.app | /usr/bin/colrm 1 22 | /usr/bin/ruby -e 'items = STDIN.readlines; items.each_index {|i| items[i].chomp!().chomp!(\"\\\"\"); print((i.modulo(2) == 0 ? items[i] : (items[i] != \"null)\") ? \" \"+items[i]+\"\\n\" : \"\\n\")) }'"
  4. set appList to paragraphs of result
Add Comment
Please, Sign In to add comment