Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
正在尝试创建applescript以重命名文件';s元数据';专辑';标签_Applescript_Metadata - Fatal编程技术网

正在尝试创建applescript以重命名文件';s元数据';专辑';标签

正在尝试创建applescript以重命名文件';s元数据';专辑';标签,applescript,metadata,Applescript,Metadata,我真的希望有人能帮我,我一直在这件事上兜圈子。我需要做的就是用字符串设置文件的元数据“album”标记。这是一个几乎完整的解决方案(我需要在注释中处理元数据) 您想将歌曲添加到iTunes吗?要使用iTunes更改ID3标记,首先需要将它们添加到iTunes中(脚本可以这样做)。不过,它们已经出现在iTunes中了吗?如果是这样的话,最好是在iTunes的播放列表或选择中使用脚本。谢谢你的时间。我曾计划在更新ID3专辑名后将它们添加到iTunes中。我不完全理解如何从iTunes上运行它——获取

我真的希望有人能帮我,我一直在这件事上兜圈子。我需要做的就是用字符串设置文件的元数据“album”标记。这是一个几乎完整的解决方案(我需要在注释中处理元数据)


您想将歌曲添加到iTunes吗?要使用iTunes更改ID3标记,首先需要将它们添加到iTunes中(脚本可以这样做)。不过,它们已经出现在iTunes中了吗?如果是这样的话,最好是在iTunes的播放列表或选择中使用脚本。谢谢你的时间。我曾计划在更新ID3专辑名后将它们添加到iTunes中。我不完全理解如何从iTunes上运行它——获取文件名和父文件夹。现在我可以遍历每个文件夹并将父文件夹的名称保存在一个字符串中,但仍然无法将该字符串放入ID3 album name标记中,这似乎是一个遗憾。等我有空的时候,我得继续讲下去(除非有人能帮助我……MacScripter上的人告诉你同样的事情:在OS X中维护ID3标签的专用应用程序是iTunes,Finder无法做到。另一方面,Finder可以浏览iTunes无法浏览的文件系统。对,因为当前的文件夹结构给出了相册名称,所以你会希望像运行它一样运行它。在重复block,将歌曲添加到iTunes播放列表中,延迟1,然后更改其相册。显然finder无法重命名ID3标签,因此需要iTunes或第三方软件。这可以解释我的困难。
on run
    set ArtistFolder to (choose folder with prompt "Select the start folder")
    RenameMetadata(ArtistFolder)
end run

on RenameMetadata(aFolder)
    tell application "Finder"
        set subFolders to every folder of aFolder
        repeat with eachFolder in subFolders
            my RenameMetadata(eachFolder)
            set theItems to every file of eachFolder
            repeat with theFile in theItems
                set strParent to name of eachFolder as string
                set strFile to name of theFile as string
                (* tell application "iTunes"
                    set album to strParent
                end tell *)
                (* set album to strParent *)
                log strFile
                log strParent
            end repeat
        end repeat
    end tell
end RenameMetadata