Scan for New Tracks (reverse of remove dead tracks)
Hi All,
Please excuse the newbie question -- I'm new to the Mac, so I'm trying to get my bearings.
Is there an AppleScript for scanning a set of folder for tracks that are *not* in the iTunes Library, and then adding them to it? This would be like the reverse of Remove Dead Tracks, but would add tracks that are new to the filesystem.
I know that this type of script is slightly against the iTunes philosophy, but I still do alot of management directly on files, so this would make process much easier.
many thanks,
zstier
[568 byte] By [
zsteir] at [2007-11-10 22:50:54]

# 1 Re: Scan for New Tracks (reverse of remove dead tracks)
hi zsteir,
Welcome to the board...
if you are running a later version of itunes (post v4) then this could be achieved by just running the file>add to library command against the folder in question. v5 and onwards has (touch wood) sorted out the duplicate library entries this used to result in.
If its always going to be the same folder then something like...
property theFolder : ""
if theFolder is "" then set theFolder to choose folder
tell application "iTunes"
add theFolder
end tell
would do it... the first time you run it you will be prompted for a folder, on subsequent runs it'll default to that folder without a prompt. If you wish to change the folder at some stage then all you need to do is trash the script's preference file located in ~/library/preferences. the file will have the same name as you save the script as.
you mention that you manage files outside of iTunes.. may i ask what you do to them ? moving them around is a sure way for iTunes to loose track of them and can cause problems in the long run...
hth
deeg
deeg at 2007-11-15 17:24:07 >

# 2 Re: Scan for New Tracks (reverse of remove dead tracks)
Originally posted by deeg
hi zsteir,
Welcome to the board...
if you are running a later version of itunes (post v4) then this could be achieved by just running the file>add to library command against the folder in question. v5 and onwards has (touch wood) sorted out the duplicate library entries this used to result in.
If its always going to be the same folder then something like...
property theFolder : ""
if theFolder is "" then set theFolder to choose folder
tell application "iTunes"
add theFolder
end tell
would do it... the first time you run it you will be prompted for a folder, on subsequent runs it'll default to that folder without a prompt. If you wish to change the folder at some stage then all you need to do is trash the script's preference file located in ~/library/preferences. the file will have the same name as you save the script as.
you mention that you manage files outside of iTunes.. may i ask what you do to them ? moving them around is a sure way for iTunes to loose track of them and can cause problems in the long run...
hth
deeg
Thanks for your answer!
I'm a new Mac user, so I didn't even check the obvious solution. I have a good reaon, though: in Windows, the Add Folder options still results in duplicates (although I have not tried 6.0). I guess I should have know that Apple was bound to take care of this!
Thanks,
Zvi
zsteir at 2007-11-15 17:25:07 >
