我有一个在文件夹中添加或更新文件的脚本。我想要做的是一个applescript将这些文件添加到iTunes。但我似乎无法遍历目录。
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
对于每次重复,theFile 的值是 myPath 的单个字符,而不是 myPath 中的实际文件。theFile 将是 M, a, c, i, n, ... 而不是 file1.mov, file2.mov, ...
谢谢你。