Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: File Operations -Move / Rename / Copy - stricmp Vs MusicBrains Picard (Read 261 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

File Operations -Move / Rename / Copy - stricmp Vs MusicBrains Picard

Greetings!

I have a file rename operations script that works pretty much as I wish. Forgive me as I"m just recently looking at my music lib from many years ago, only now considering fixing some things which are out of order.

As I have a few different file types Incl mp3, flac, mpc, I have my lib setup like E.g. M:\my_music_lib\mp3 ; M:\my_music_lib\flac ; M:\my_music_lib\mpc ; etc.

I thought my script automatically made the filetype folders, but I could be wrong. Also, MusicBrains Picard claims to use the foobar2000 format scripting syntax. But, when I use the following in Picard, it throws an error, unknown function: $stricmp.

My script is:
Code: [Select]
$replace(%filename_ext%,%filename%,)/$if2($if($stricmp($left(%album artist%,4),The ),$substr(%album artist%,5,5)'/'$substr(%album artist%,5,244)', '$substr(%album artist%,1,4)'/',$left(%album artist%,1)'/'%album artist%'/'),$if($stricmp($left(%artist%,4),The ),$substr(%artist%,5,5)'/'$substr(%artist%,5,244)', '$substr(%artist%,1,4)'/',$left(%artist%,1)'/'%artist%'/'))$if(%album%,$if($or($stricmp(%album artist%,Various Artists),$stricmp(%album artist%,Various)),%album% '(Various Artists)'$if($isgreater($num(%disc%,2),0,'disc number true','disc number false'),'[disc '%disc%']/','/'),%album% $if($isgreater($num(%disc%,2),0,'disc number true','disc number false'),'[disc '%disc%']/','/')),'[UNKNWON ALBUM]/')$if(%artist%,%artist%,$if(%band%,%band%,'[UNKNOWN ARTIST]'))$if(%album%,' - '%album% $if($or($stricmp(%album artist%,'Various Artists'),$stricmp(%album artist%,'Various')),'(Various Artists) ',)$if($isgreater($num(%disc%,2),0,'disc number true','disc number false'),' [disc '%disc%']',),' - [UNKNOWN ALBUM]')$if(%tracknumber%,'- '$num(%tracknumber%,2),' - 00')$if(%title%,' - '%title%,' - [UNKNOWN TITLE]')

maybe overkill, but apparently worked in the past, in foobar2000 it works of course.

I guess I"m asking two things.
#1.) Is there a function that I can use so so I would have a path such as:
my_music_lib\EXTension\Alpha-char-of-artist\Artist\Album\file.extension
where, EXTension above would be either [drive:\]my_music_lib\mp3 | my_music_lib\flac | my_music_lib\mpc ?

#2.) understanding this isn't a MusicBrainz Picard forum, do you have a suggestions regardless for a compatible script/ how to do the $stricmp() there?

thank you!

EDIT: the script above actually does make the file-type subfolder. For some reason (which I suspect is a folder permissions issue, as the target drive is a "slave" to a new Win 11 system.
Probably nothing y'all can help me with. I didn't realize it was already making the folder as desired.

https://imgur.com/xotevg5 [working]
vs
https://imgur.com/HGKePww [no results]
Lastfm as PSU_Strummer. i used to play guitar on stage. that was fun. now i enjoy listening to it on foobar2000

Re: File Operations -Move / Rename / Copy - stricmp Vs MusicBrains Picard

Reply #1
Also, MusicBrains Picard claims to use the foobar2000 format scripting syntax. But, when I use the following in Picard, it throws an error, unknown function: $stricmp.

$stricmp isn't a MusicBrainz scripting function https://picard-docs.musicbrainz.org/v2.6/en/functions/list_by_name.html

I think $rsearch could be used instead to achieve the string comparison. But I'd ask on the MusicBrainz community forum in the Picard section if you have no luck.