Advertisement
Guest User

Untitled

a guest
Oct 5th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on open someFolder
  2.     tell application "Finder"
  3.         repeat with eachSubDir in (get every folder of folder someFolder)
  4.             try
  5.                 --display dialog (eachSubDir as text)
  6.                 repeat with eachFile in (get every file of folder (eachSubDir as alias))
  7.                     try
  8.                         if (get name of eachFile) does not contain ".m3u" then
  9.                             tell application "iTunes" to add eachFile as string
  10.                             --display dialog (eachFile as text)
  11.                         end if
  12.                     on error errmsg
  13.                         display dialog errmsg
  14.                     end try
  15.                 end repeat
  16.             end try
  17.         end repeat
  18.     end tell
  19. end open
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement