Skip to main content
Topic: [Title Formatting Help] Check if directory exists (Read 772 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Title Formatting Help] Check if directory exists

I have to check if an arbitrary directory (inside library folder) exists. I will explain why I need this. I usually arrange my music this way:

Code: [Select]
+ Music
   + Artist 1
      + Album 1
      + Album 2
   + Miscellaneous // Misc songs from various artists (maybe also from the "Artist 1" or "Artist 2").
                   // Album tag NOT present.


Using facets, I can group all artist's songs from the "Miscellaneous" folder into just 1 "Various artists", simply checking if the %album% tag exists. My need is to exclude from the "Various artists" group those songs for which a folder in the main root "Music" exists, and group songs into the right facets artist view. Real example:

Code: [Select]
+ Music
   + Editors
      + An End Has a Start
      + In This Light and on This Evening
   + Miscellaneous
      - Editors - Munich.mp3
      - Foals - Spanish Sahara.mp3


My custom facets "algorithm" I was thinking is:
  • Build the full directory path from the current song eg. C:\Users\Gremo\Music\Editors. I can do this.
  • Check if the directory exists. This is the main issue.
  • If yes, output "%artist% (grouping Editors - Munich.mp3 with "Editors" submenu)
  • If not exists, output "Various Artits" (putting Foals - Spanish Sahara.mp3 into it)
  • Continue with the next song


Thanks for helping. Other solution accepted. If you can't understand my needs, just ask.

[Title Formatting Help] Check if directory exists

Reply #1
2. Check if the directory exists. This is the main issue.


Unfotunately this can't be done. You can only evaluate the inherent properties of a given file.

 
SimplePortal 1.0.0 RC1 © 2008-2019