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: problem parsing rename scheme (Read 3049 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

problem parsing rename scheme

In 0.8.3 I'm having trouble using the rename function.
My rename scheme looks like this:
Code: [Select]
%artist% - %date% - %album%\[Disc %disc%\]%artist% - $num(%tracknumber%,2) - %title%

As you can see, if the "disc" tag is present, a corresponding subdirectory should be created. While I am in edit mode, the preview works as expected. At the regular rename dialog preview, I get [SYNTAX ERROR IN FORMAT STRING] instead. The files are also renamed to "[SYNTAX...]".<ext>. This is independant of the file actually having the "disc" tag.

I have created a screenshot illustrating the problem.

problem parsing rename scheme

Reply #1
Filename pattern is split by separators *before* parsing, to prevent possible slash characters in tags from being recognized as directory separators.
As for preview ignoring it - consider it a bug, noted, thanks for the report.
Moving the backslash out of square brackets should do exactly what you want (more than one backslash in a row will be ignored):
Code: [Select]
%artist% - %date% - %album%\[Disc %disc%]\%artist% - $num(%tracknumber%,2) - %title%
Microsoft Windows: We can't script here, this is bat country.

problem parsing rename scheme

Reply #2
Thank you for the fast reply. After moving the backslash, things work as expected. Problem solved!

problem parsing rename scheme

Reply #3
Instead of starting a new thread...I can ask in this thread.....want a advanced string....

If the genre is has rock or metal, then the files should be in Rock, Metal\Artist\album, if the genre is r&b, then it should be in r&b\artist\album, and so on (just do those two, can figure out the rest myself), but if it is varioius artists, and the album has soundtrack or OST, then it should be in Soundtracks\,album\, but if disc exists, then it should be in Soundtracks\album\,cd %disc%.
And if album doesn't have soundtrack, and it is variouis, then it should be like the soundtrack above, but in Samlingsskivor instead of Soundtracks.


Thanks a Lot if you can help!

problem parsing rename scheme

Reply #4
Random idea (haven't tested it, just typed it up, so there can be mistakes):

Code: [Select]
$if(%various%,$if($or($strstr(%album%,soundtrack),$strstr(%album%,OST)),Soundtracks,Samlingsskivor),[%genre%])\
$if($or(%various%,$strstr(%album%,Soundtrack),$strstr(%album%,OST)),,[%artist%])\
[cd %disc%]\
[%tracknumber%] $if2(%title%,Unknown title)

You haven't mentioned how you mark an album as VA, so I assumed you use %various%.

 

problem parsing rename scheme

Reply #5
Quote
Random idea (haven't tested it, just typed it up, so there can be mistakes):

Code: [Select]
$if(%various%,$if($or($strstr(%album%,soundtrack),$strstr(%album%,OST)),Soundtracks,Samlingsskivor),[%genre%])\<!--QuoteEBegin-->$if($or(%various%,$strstr(%album%,Soundtrack),$strstr(%album%,OST)),,[%artist%])\<!--QuoteEBegin-->[cd %disc%]\<!--QuoteEBegin-->[%tracknumber%] $if2(%title%,Unknown title)

You haven't mentioned how you mark an album as VA, so I assumed you use %various%.
[a href="index.php?act=findpost&pid=232479"][{POST_SNAPBACK}][/a]


I am marking my various artist albums with a "," (without quotes), first in the folder the album is in, that's why I wanted various if path has ",".

Thanks a lot...I can change the code for various myself.