iTunes Hints & Tips

Tag From Filename

An AppleScript equivalent for the Windows script TagFromFilename which can be used with macOS Catalina or later.

To use the script download the file TagFromFilename.zip to your computer, open that to extract the TagFromFilename.scpt file inside, which will then open with the Script Editor. Select some tracks in Music and run the script with the play button in Script Editor. The script will work through each selected track in turn comparing properties in the tag with those implied by the file path. Where these are different the script will update the tag to reflect the information in the path. Here are some screenshots:

 

Tag From Filename

 

Tag From Filename

 

Backup your library before running the script and turn off the option under Music > Preferences > Files to Keep Music Media folder organized. Test the script with a small batch of files to ensure it functions as you expect before applying to larger batches.