Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. tell application "iTunes"
  2. set libPlaylist to library playlist "Library" of source "Library"
  3. set aTrack to item 1 of file tracks of libPlaylist
  4. set trackPath to (location of aTrack) --> alias "..."
  5. set posixPath to POSIX path of trackPath --> "/Volumes/<disk>/iTunes Library/Music/<artist>/<album>/<title.ext>"
  6.  
  7. set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "/"}
  8. set theList to text items of posixPath
  9. set AppleScript's text item delimiters to oldTID
  10. set iTunesMediaLoc to "/" & item 2 of theList & "/" & item 3 of theList & "/" & item 4 of theList & "/"
  11.  
  12. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement