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: Count files in a directory and/or count files with specific tags in a directory? (Read 1054 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Count files in a directory and/or count files with specific tags in a directory?

TL;DR: As the title states. Is this something that is possible?? Using something with $directory(path,n) maybe??

Full context:

  • I store all albums in their own folders
  • I use a 2 value rating system for my library, All tracks have a rating of 1 or 2, or they do not have a %rating% tag
  • I'd like to create an "Album Score" tag, which would assign a score or rating to an album based on the number of tracks with a rating of 1 and number of tracks with a rating of 2.
  • Since in my particular case, all album tracks are stored in a folder unique to that album, this could be accomplished if we can extract the directory path from the file, and count the number of '1' rating files, and '2' rating files to calculate the Album Score.
  • Looking through the title formatting reference, I'm not seeing a clearcut way to accomplish but was hoping someone more familiar might have an idea? In the Album list I see that it will return a count of tracks in an album or tracks from an artist based on critera, so that gives me hope...

 

Re: Count files in a directory and/or count files with specific tags in a directory?

Reply #1
Hi there,

Yes and no. Several third-party components can provide a total count of items, in a playlist grouping or library view, but not possible to use title formatting to compare different tracks - it only evaluates the one track and cannot access info from the next / previous track.

Components such as Facets and SimPlaylist offer group statistics, one of which is to average the %rating% for that group - essentially an album rating, if grouping by album.

Aside from that I guess you'd have to manually tag each album with a rating / score. (Probably more annoying than worthwhile)

Cheers ;)

[Edited for clarity]