It does not put the discnumber in the file

Hello, sorry for the language, I am Spanish and I use the google translator to write this post

I want to rename my files with the disk number (even if I only have one disk), the track number and the song name, this is my script:

%albumartist%/
$if(%date%,$left(%date%,4)) - $left(%album%,40)/
$num(%discnumber%,2))-$num(%tracknumber%,2) - %title%

I have looked at other posts, and I think the synthesis is well written

But when you click save, the disk number does not appear, can someone help me? Thank you

1 Like

When I try your script in Picards editor for file naming scripts, the disc number is shown in the examples at the bottom of the window. The only thing missing is an ( in front of $num(%discnumber%,2)). What does it say in your case?

3 Likes

Is it possible that you’re just using the existing metadata in your files and the %discnumber% value is missing? If so, try replacing %discnumber% in your script with $if2(%discnumber%,1) and see if that does what you want. I’ll try translating this to Spanish with DeepL.


¿Es posible que esté utilizando los metadatos existentes en sus archivos y que falte el valor de %discnumber%? Si es así, intenta reemplazar %discnumber% en tu script con $if2(%discnumber%,1) y mira si eso hace lo que quieres. Intentaré traducir esto al español con DeepL.

4 Likes

Hello! Sorry for the late reply, but I’ve been very busy.

The disc number labels are correct, they are filling.

I have tried the script with recordings of 1, 2 and 3 discs and there is no way to write that label to the file.

Hello! thanks for the translation, really google translator is a good tool to communicate internationally :slight_smile:
I have tried what you tell me, and it still does not write the disk number in the file.

I have uninstalled MBP, I have tried it on another PC, I have verified that the files are not read-only… and there is no way, it is very strange.

Do you mean that the disc number doesn’t appear in your file name, or doesn’t appear in the file’s metadata? If it doesn’t show up in the metadata then I’m guessing that you have this in your file renaming script and not in a tagging script. If it is in a tagging script, then I’m guessing that you’re not matching your files to releases retrieved from MusicBrainz before saving them but are saving directly from the clustering pane. That would cause the tagging script not to be run. If that’s the case, you need to force the script to run by right-clicking on the cluster, go to “Run scripts” and then select the appropriate tagging script.

If the disc numbers show in the metadata, but your files are not being renamed then check that you have the “Rename files when saving” option checked in the “File Naming” section of the “Options…”

Before entering the forum, I checked those things, still, I will check what you say again, but I have another problem with the software. After several sessions, it stops saving the file metadata, a red icon appears next to the files. I have to uninstall the program and reinstall it. I don’t know what could be happening