INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Smartlist to filter files that do not conform to my filename naming standard  (Read 1764 times)

jaxtherogue

  • World Citizen
  • ***
  • Posts: 105

I would like to create a smartlist that will show me which files in my library (all audio) do not conform to my filename naming standard. I have tried a bunch of ways but am not very good with expressions and need some help. My naming standard look like [track #]~[album artist(auto)]~[name].  I have tried using Filename (name) does not start with [track #]~  but haven't had any luck.  Any help would be appreciated
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854

Looks like you need to use a Custom field along the lines of...

[=isequal([filename (name)],[track #]~[album artist (auto)]~[name])]=0

This will check whether 'filename (name)' matches your format and will display every entry that does not.

If you bring up the smartlist form and click on import/export you can copy/paste the above in the 'Smartlist rules data' box, click OK and give it a try...
Logged

jaxtherogue

  • World Citizen
  • ***
  • Posts: 105

Thanks! I see the idea here. I did give it a try though it returns every file in my library.  Is it perhaps because th the second compare value does not accommodate for the file's extension, i.e. .flac, .mp3?
Logged

pahunt

  • World Citizen
  • ***
  • Posts: 236

I wanted to do the same thing and while I managed it, it was trickier than I first imagined. See this thread for the gory details

http://yabb.jriver.com/interact/index.php?topic=89406.0

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854

Thanks! I see the idea here. I did give it a try though it returns every file in my library.  Is it perhaps because th the second compare value does not accommodate for the file's extension, i.e. .flac, .mp3?

Try changing the 0 to a 1 ... could be I set the test incorrectly for your database.  Oops.
Logged

jaxtherogue

  • World Citizen
  • ***
  • Posts: 105

Thanks again.I see the end in sight. I think the problem is that when I rename files using MC with [Track #] the file is renamed using a leading zero (as it should for a file name) but the [Track #] value itself does not use the leading zero, so that value will never match in the search expression.
Logged

jaxtherogue

  • World Citizen
  • ***
  • Posts: 105

I got it working.  Here is my final custom smarlist expression:
[=isequal([filename (name)],PadNumber([track #], 2)~Clean([Artist], 3)~Clean([name], 3).[File Type])]=0

Thanks for all the help!
Logged
Pages: [1]   Go Up