Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Script to duplicate Apple Lossless iTunes library as MP3 files
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="McYukon" data-source="post: 1117399" data-attributes="member: 101117"><p>This should work, I successfully tested it with a couple of mp3s.</p><p></p><p>[CODE]tell application "iTunes"</p><p> activate</p><p> </p><p> set sel to selection</p><p> </p><p> repeat with this_track in sel</p><p> set trackComposer to this_track's composer</p><p> set trackAlbum to this_track's album</p><p> set trackName to this_track's name</p><p> </p><p> tell application "Finder"</p><p> </p><p> set path3 to "Macintosh HD:Users:nick:Desktop:music" & trackComposer as text #Source folder</p><p> set path4 to "Macintosh HD:Users:nick:Desktop:mp3" & trackComposer as text #Destination folder</p><p> </p><p> if exists file (path3 & ":" & trackName & ".mp3") then</p><p> if exists file (path4 & ":" & trackName & ".mp3") then</p><p> move file (path3 & ":" & trackName & ".mp3") to trash</p><p> else</p><p> {}</p><p> end if</p><p> end if</p><p> </p><p> end tell</p><p> end repeat</p><p>end tell[/CODE]</p></blockquote><p></p>
[QUOTE="McYukon, post: 1117399, member: 101117"] This should work, I successfully tested it with a couple of mp3s. [CODE]tell application "iTunes" activate set sel to selection repeat with this_track in sel set trackComposer to this_track's composer set trackAlbum to this_track's album set trackName to this_track's name tell application "Finder" set path3 to "Macintosh HD:Users:nick:Desktop:music" & trackComposer as text #Source folder set path4 to "Macintosh HD:Users:nick:Desktop:mp3" & trackComposer as text #Destination folder if exists file (path3 & ":" & trackName & ".mp3") then if exists file (path4 & ":" & trackName & ".mp3") then move file (path3 & ":" & trackName & ".mp3") to trash else {} end if end if end tell end repeat end tell[/CODE] [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Script to duplicate Apple Lossless iTunes library as MP3 files
Top