# Can I print the titles of all the songs in my Windows Media Player library?

**URL:** <https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297>\
**Category:** Factual Questions\
**Created:** [January 18, 2005, 3:00am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297 "2005-01-18T03:00:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [January 18, 2005, 3:00am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/1 "2005-01-18T03:00:31Z")

</div>

And, if yes, how?

Thanks.

---

<div class="post-metadata">

**Author:** ![TJdude825](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@TJdude825](https://boards.straightdope.com/u/TJdude825)\
**Post date:** [January 18, 2005, 5:50am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/2 "2005-01-18T05:50:38Z")

</div>

Do you keep all your music files in one folder? If so, this might be a Windows question, not a WMP question. Not that I know the answer, but that might be the first step for someone else to figure it out.

---

<div class="post-metadata">

**Author:** ![HugoRed](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@HugoRed](https://boards.straightdope.com/u/HugoRed)\
**Post date:** [January 20, 2005, 12:03am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/3 "2005-01-20T00:03:27Z")

</div>

> [@KarlGauss](#):
>
> And, if yes, how?
> 
> Thanks.

I have a program I downloaded called " JDirPrinter.exe " that I use all the time. It was free, as far as I know it still is…do a Google on JDirPrinter.  
You can select the directory you want to print and the characteristics you want to record.

---

<div class="post-metadata">

**Author:** ![KarlGauss](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/karlgauss/32/3713_2.png) [@KarlGauss](https://boards.straightdope.com/u/KarlGauss)\
**Post date:** [January 20, 2005, 4:25am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/4 "2005-01-20T04:25:09Z")

</div>

Many thanks! I’ll check it out.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [January 20, 2005, 4:34am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/5 "2005-01-20T04:34:35Z")

</div>

If you’ve edited any track info in WMP, it’s not stored as part of the .mp3, so you’d be printing what was originally in there.

---

<div class="post-metadata">

**Author:** ![maleinblack](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@maleinblack](https://boards.straightdope.com/u/maleinblack)\
**Post date:** [January 20, 2005, 5:43am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/6 "2005-01-20T05:43:01Z")

</div>

Just in case nothing works out, you could save the playlist in a .m3u format and then open it in Winamp. You can then go to Misc\> Misc \> Generate HTML Playlist and then print it out from IE or Firefox.

---

<div class="post-metadata">

**Author:** ![galt](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@galt](https://boards.straightdope.com/u/galt)\
**Post date:** [January 20, 2005, 10:35am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/7 "2005-01-20T10:35:19Z")

</div>

Here’s some Windows Script Host code to do it. Paste this into a text file called “listsongs.js” and then run “cscript //nologo listsongs.js” from the command line. If you want to save the list, you can run “cscript //nologo listsongs.js \> my\_song\_list.txt”.

```auto

var wmp = WScript.CreateObject("WMPlayer.OCX.7");
if(wmp)
{
    var collection = wmp.MediaCollection;
    
    if(collection)
    {
        var allsongs = collection.getByAttribute("MediaType", "audio");
        if(allsongs)
        {
            for(var i=0; i<allsongs.count; i++)
            {
                var item = allsongs.item(i);
                var album = item.getItemInfo("album");
                var artist = item.getItemInfo("artist");

                if(album && artist)
                    WScript.Echo(item.name + " (from \"" + album + "\" by " + artist + ")");
                else if(artist)
                    WScript.Echo(item.name + " (by " + artist + ")");
                else
                    WScript.Echo(item.name);
            }
        }
    }
}
else
{
    WScript.Echo("Error accessing WMP database.");
}

```

---

<div class="post-metadata">

**Author:** ![galt](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@galt](https://boards.straightdope.com/u/galt)\
**Post date:** [January 20, 2005, 10:37am UTC](https://boards.straightdope.com/t/can-i-print-the-titles-of-all-the-songs-in-my-windows-media-player-library/285297/8 "2005-01-20T10:37:14Z")

</div>

Oh, and if you really do just want the titles, change this:

```auto

                if(album && artist)
                    WScript.Echo(item.name + " (from \"" + album + "\" by " + artist + ")");
                else if(artist)
                    WScript.Echo(item.name + " (by " + artist + ")");
                else
                    WScript.Echo(item.name);

```

to this:

```auto

                WScript.Echo(item.name);

```

…I just thought it was nicer to print out the album and artist if it was available.
