The built-in export function (Export Album List) does almost exactly what I want it to do, but ...
It lists the albumartist and album for each file in the album, so that for an album that has 12 tracks, the resulting output file lists the same information 12 times instead of just once.
Not having any experience writing scripts, is it possible to revise this script so that it only lists the albumartist/album information once for each of the albums in a folder?
The resulting file is needed so that our broadcaster/volunteers can easily see what music is available on our server.
Our library's directory tree architecture is \albumartist\album\files, where there may be two or more albums in many of the albumartist folders.
Yes, thank you for your answer. This does work, except for the first line. For some reason, it appears to be ignored. The resulting file was stored in thei directory containing the albumartists/albums of interest.
I was surprised at the length of time it took for this script to run when confronted by something like 6,500 albums in 3,025 albumartist folders! The resulting file was 273 pages long with only a single space preceding each albumartist.
How would one go about counting the number of albums in the parent folder?
$filename($getEnv(USERPROFILE)\Desktop\Album List.txt,utf-16)
Total Number of Albums: $get(TotalAlbums)
$loop(%albumartist%,1)%albumartist% ($get(NumberOfAlbums))
$loop(%album%,1)$puts(NumberOfAlbums,$add($get(NumberOfAlbums),1)) %album%
$loopend()$puts(TotalAlbums,$add($get(TotalAlbums),$get(NumberOfAlbums)))$puts(NumberOfAlbums,0)
$loopend()
The first line of this export script should appear as the "Export file name" in the Export dialogue window.
If it does not, then click any other export script from the list and then click back to this script.
Now, after processing, the export file "Album List.txt" should be written on the Desktop.
Thanks again for your help with my requests. Maybe someday soon I'll be able to do this on my own.
The second script code works very well. All I really expected was the top line of the results—the total number of albums. It's OK the way it is, though.