Help with file naming!

Tags: #<Tag:0x00007f7d01aae8a0>

Hello friends!

Im trying to figure ot how to make the file naming the way i want but i cant get it right!
Are there eny friendly users out there who can help me??
I want this pattern:

X:\musik\sorted\A\Artist, The\AlbumType\Year - Album (Label)\CD-Track - Artist - Title

Thank for helping!

1 Like

we are all friendly here :wink:

to do it you will need to create a script in placard someone eles may be able to tell you what you need to put but the best i can do is give you this link
https://picard.musicbrainz.org/docs/scripting/

you will need to tick move files when saving then change what is in the box that is called name files like this to what you wont

Yes, i know where to put the text. I have tried to alter the examples found here: https://picard.musicbrainz.org/docs/scripting/#tagger_script_examples
But with no luck. Thank you for trying to help!

1 Like

all good :slight_smile: while you are waiting have a look in here you may find something that may help

The thing that helped me get past the How The Heck Does This Work?! curve …

Put letters, numbers, whatever, in between your stuff while you’re editing so you can see what is doing exactly what in your scripting.

… and it goes from top to bottom, everything is done in order, and the output being generated is a continuous line that you’ll see in the example text as you build it.

Put “X:\musik\sorted” in the Destination Directory entry.

Your scripting will be generating the rest of it and in the example at the bottom you’ll see the combined result.

Starting with something like this:

$noop(★ Artist with first letter of first name ★)
$noop(root/<*>/B/The B-52's)
$if($eq(%_orderTypeForArtist%,1),
$if2(%_artistSort%,%_albumartistForFilename%,%_artistForFilename%)
)/

Willl show your example as:
(however the Windows version shows the example with drive letters and back slashes. I’m not using Windows, but the idea is the same)

Example
/musik/sorted/B/The B-52’s … etc.

If you type some characters in up there after the / (e.g.: abc123)

The example will be:
/musik/sorted/B/The B-52’s/abc123

One part at a time, $if, $set, $eq …%label% %year% %artist%
Just type that stuff in and watch what the example does. Go from there.

Some of the tags you will NOT show anything on the example because they’re not hard coded into the routine that is generating the example, like %label%, but the basic stuff is.

In my example screen shot, you see where I typed aaaaaa in and it’s showing right before the track number. Thats how you can see what part of the script is affecting where in the output.

(and I also added extra stuff to the hard coded example stuff, so if you entered exactly what I have in the script box, you would NOT see the same example, but it would create the intended output on disk.

An earlier version of that script I’ve got going on there is in that thread referenced in the above post. As soon as I get one more thing unscrambled, I’m going to post the revised one. I posted a thread for the “one more thing” , too… (I want to see the track time in the filename with a ‘colon’, not underscore. That is, a unicode filesystem safe character that happens to look very close to a colon.)

3 Likes

Thank you all! Think i got it right!
Heres the setup i use:

$upper($firstalphachar($if2(%albumartistsort%, %artistsort%),#))
/$left($if2(%albumartistsort%, %artistsort%),18)/
%_primaryreleasetype%/
%originalyear% - %album% (%label%)/
%discnumber%-$num(%tracknumber%,2) - $left(%artistsort%,30) - $left(%title%,30)

3 Likes