Navigate to Options > Options.
$noop( New Script ) $set(_my_artist,"AA") $noop( Check if this album falls under Various Artists. ) $set(_is_various_artists,$if2(%albumartist%,%artist%)) $noop( Configure which top-level directory to go under. Removes starting The. Removes quotes. Removes other odd characters. $set(_my_dir,$if2(%albumartist%,%artist%)) $set(_my_dir,$if($eq(%_my_dir%,Various Artists),%_my_dir%,$upper($left($delprefix(%_my_dir%),1)))) ) $set(_my_dir,%albumartist%) $if($eq(%_my_dir%,),$set(_my_dir,%artist%)) $set(_xmy_dir,$if($startswith(%_my_dir%, The),$replace(%_my_dir%,The,),%_my_dir%)) $set(_xmy_dir,$delprefix(%_my_dir%,The,A,An)) $set(_my_dir,$delprefix(%_my_dir%,The)) $set(_my_dir,$rreplace(%_my_dir%,[“”"_*:\(\)[],)) $set(_my_dir,$rreplace(%_my_dir%,^[.],)) $set(_my_dir,$trim(%_my_dir%)) $set(_my_dir,$if($eq(%_my_dir%,Various Artists),%_my_dir%,$upper($left(%_my_dir%,1)))) $noop( Configure the artist name. Removes starting The. Removes quotes. Removes other odd characters. If artist starts with a fullstop, such as .38 Special, then removes the leading fullstop. ) $set(_my_artist,%albumartist%) $if($eq(%_my_artist%,),$set(_my_artist,%artist%)) $set(_xmy_artist,$if($startswith(%_my_artist%,The),$replace(%_my_artist%,The,),%_my_artist%)) $set(_xmy_artist,$delprefix(%_my_artist%,The,A,An)) $set(_my_artist,$delprefix(%_my_artist%,The)) $set(_my_artist,$rreplace(%_my_artist%,[“”"_*:],)) $set(_my_artist,$rreplace(%_my_artist%,^[.],)) $noop( Configure what the album name will be called. Removes quotes. Removes other odd characters. ) $set(_my_album,%album%) $set(_my_album,$rreplace(%_my_album%,[“”"_*:],)) $noop( Configure the album date. Only uses the 4-digit year, if it exists. ) $set(_my_album_date,%date%) $set(_my_album_date,$if(%date%,$left(%date%,4),)) $if($eq(%_my_album_date%,),$set(_my_album_date,$if(%originaldate%,$left(%originaldate%,4),))) $if($eq(%_my_album_date%,),$set(_my_album_date,$if(%originalyear%,$left(%originalyear%,4),))) $noop( Configure the album title. If the album has multiple-artists, then adds that artist name to back of the title. ) $set(_my_title,%title%) $set(_my_title,$if(%_multiartist%,%title% [%artist%],%title%)) $noop( Configure the track number. If the album has multiple-disks, then prefixs the disk number to the track number. ) $set(_my_track_no,$num(%tracknumber%,2)) $set(_my_track_no,$if($gt(%totaldiscs%,1),$pad(%discnumber%,2,0),)) $set(_my_track_no,$if($gt(%totaldiscs%,1),$pad(%discnumber%,2,0)-$num(%tracknumber%,2),$num(%tracknumber%,2))) $noop( Writes the results. Depends on whether the album falls under Various Artists. ) $if(%_my_album_date%, $set(my_result,%_my_dir%/%_my_artist%/%_my_album_date% - %_my_album%/%_my_track_no% - %_my_title%), $set(my_result,%_my_dir%/%_my_artist%/%_my_album%/%_my_track_no% - %_my_title%) ) $if(%_my_album_date%, $set(my_result_various_artists,%_my_artist%/%_my_album% \(%_my_album_date%\)/%_my_track_no% - %_my_title%), $set(my_result_various_artists,%_my_artist%/%_my_album%/%_my_track_no% - %_my_title%) ) $if($eq(%_my_dir%,Various Artists), %my_result_various_artists%, %my_result% )