Simple iTunes script not working?

I have this little peice of code to add all the files in a specific folder to an iTunes playlist

set finalFolder to (choose folder) as string
tell application "iTunes"
	add every file in finalFolder to playlist "blog mp3s"
end tell

It seems like it would work, except when I try to run it it says

any help? That folder only has mp3s in it.

Thanks.

I think your problem is with the way you are telling iTunes to add the files. I don’t script iTunes much, but I see where your problem is. In your script “finalFolder” is a string, containing the name of the folder you chose. The “Add” command in iTunes requires a file path. Try the following:

set finalFolder to (choose folder) as string
set file_list to list folder finalFolder without invisibles

tell application “iTunes”
repeat with song_ in file_list
set path_to_song to (finalFolder as string) & song_
add (path_to_song as alias) to playlist “playlist_name”
end repeat
end tell

Andy