[SOLVED] I cant get year or orig. year tag to work!

Hi!
I cant get any year tag to show when renaming files. It just skips that tag!
I have tried to erase:
$if2(%originalyear%,$left(%originaldate%,4),$left(%date%,4),0000)
and replace it with only YEAR tag or ORGINALYEAR, but nothing! It just ignore that tag!
Can someone telle me what im doing wrong??

This is my pattern i use:

$upper($firstalphachar($if2(%albumartistsort%, %artistsort%),#))/
$left($if2(%albumartistsort%, %artistsort%),30)/
%_primaryreleasetype%-%_secondaryreleasetype%/
$if2(%originalyear%,$left(%originaldate%,4),$left(%date%,4),0000) - %album% ($if(%date%,$left(%date%,4),----)) (%label%)/
$if($gt(%totaldiscs%,1),$if(%discnumber%, CD0%discnumber%\,),) *
$num(%discnumber%,2)-$num(%tracknumber%,2) - $left(%artist%,30) - $replace($replace($replace($replace($replace($replace(%title%,?,?),!,!),,
),/,/),:,:),…,…)*

If i remove / on every line it works. But why cant i add folders in my setup?

I haven’t tested this, but you might have to escape the brackets around $if(%date%,$left(%date%,4),----) as \($if(%date%,$left(%date%,4),----)\) and the same with the brackets around %label%.

You say that you tried to replace the $if2(%originalyear%,$left(%originaldate%,4),$left(%date%,4),0000) portion, but it still shows up in the pattern that you use. What have you tried that didn’t work? I think something like $if2(%originalyear%,$left(%date%,4)) should do what you want.

Thank you for trying to help me. I tried like this:
$upper($firstalphachar($if2(%albumartistsort%, %artistsort%),#))/
$left($if2(%albumartistsort%, %artistsort%),30)/
%_primaryreleasetype%-%_secondaryreleasetype%/
$if2(%originalyear%,$left(%date%,4)) - %album% ($if(%date%,$left(%date%,4),----)) %label%
$if($gt(%totaldiscs%,1),$if(%discnumber%, CD0%discnumber%\,),)
$num(%discnumber%,2)-$num(%tracknumber%,2) - $left(%artist%,30) - $replace($replace($replace($replace($replace($replace(%title%,?,?),!,!),,),/,/),:,:),…,…)

But i can still not place / on any line. What bracket on line:
$if(%date%,$left(%date%,4),----) as \($if(%date%,$left(%date%,4),----)\)
should i remove? I tried to remove them but a get an renaming error.

The script that you included in your most recent post seems to work here.

I’m not understanding what you mean by “But i can still not place / on any line.” Are you trying to include a slash (/) as part of the file title or directory names?

Yes i want to make folderss. The / is added to make this happen.
Every line is one folder
like this:
B/Beatles, The/ primaryreleasetype - secondaryreleasetype/1965 - AlbumName (2005) (Label)/Disc-Track - Artist - Title

Okay, I think I understand. Give this a try and see if it does what you want:

$upper($firstalphachar($if2(%albumartistsort%, %artistsort%),#))/
$left($if2(%albumartistsort%, %artistsort%),30)/
%_primaryreleasetype%$if(%_secondaryreleasetype%,-%_secondaryreleasetype%)/
$if2(%originalyear%,$left(%date%,4)) - %album% \($if(%date%,$left(%date%,4),----)\)$if(%label%, \(%label%\))/
$if($gt(%totaldiscs%,1),$if(%discnumber%,CD$num(%discnumber%,2)/),)
$num(%discnumber%,2)-$num(%tracknumber%,2) - $left(%artist%,30) - $replace($replace($replace($replace($replace($replace(%title%,?,?),!,!),,),/,/),:,:),…,…)```

hmmm no that didnt make it work either, sorry.

Take a look under sorted > G > Jerry Goldsmith because according to your script it should sort by the artist’s sort name. Also make sure that you have the “Move Files” option selected.

4 Likes

YES! “Move files” was not enabled!
Thank you!!

1 Like