I have a script that add or update files in a folder. What I want to do is for an applescript to add these files to iTunes. But I can't seem to loop through the directory.
tell application "iTunes"
if playlist myPlaylist exists then delete playlist myPlaylist
set newPlaylist to (make new user playlist with properties {name:myPlaylist})
repeat with theFile in myPath as list
add theFile to playlist myPlaylist
end repeat
end tell
For every repeat, the value of theFile is the individual character of myPath, not the actual file in myPath. theFile will be M, a, c, i, n, ... instead of file1.mov, file2.mov, ...
Thank you.