Apple Scripting for a New Mac Convert towards Music Selection DJ App

Apple Enthusiasts I need some help and advice on Apple Scripting.

I am a Deejay who on a regular basis must update the top 200 songs from a list. My question is the following:

Is there a way to create a script that reads from a text file (comma delimited, or even a table) then it searches for the file based on the table on an external drive through finder.

Then it copies what it finds into a folder, and what it doesn’t find it flags as unknown or not found.

This can be complicated, I understand but I have a substantial music library and a script like this could save hundreds of manual hours.

Unfortunately I have no experience with scripting on a Mac.

Thank you in advance for any direction.


DeeJay Galaga

Model: MacBook Pro
Browser: Safari 6533.18.5
Operating System: Mac OS X (10.6)

It depends on how your music collection is organized. Do the filenames contain artist names? Is it organized in folders by artist and album like the iTunes library? Would the text file contain exact matches to the file names or metadata?

I’d try a shell script like this first:


cd “/Library/User Pictures”

for v in $names; do
v2=echo "$v" | tr ' ' '*'
found=find . -iname *"$v2"*
lc=echo "$found" | wc -l
if [[ $lc -ne 1 ]]; then
echo “$found”
elif [[ -f “$found” ]]; then
cp “$found” /0
echo “no $v found”
You could edit the script with TextEdit and run it in Terminal, or use a code editor like TextWrangler to do both.