{"id":466,"date":"2009-09-05T22:50:15","date_gmt":"2009-09-06T03:50:15","guid":{"rendered":"http:\/\/fiveforks.com\/ted\/2009\/09\/cleaning_up_playlist_files\/"},"modified":"2009-09-05T22:50:15","modified_gmt":"2009-09-06T03:50:15","slug":"cleaning_up_playlist_files","status":"publish","type":"post","link":"https:\/\/www.fiveforks.com\/ted\/2009\/09\/cleaning_up_playlist_files\/","title":{"rendered":"Cleaning Up Playlist Files"},"content":{"rendered":"<p>I&#8217;m loading up the Archos now that it has a super big hard drive and can hold all of my music. I keep singles in a file called @Downloads. The @ is so that it sorts to the top of the list. But the Archos doesn&#8217;t automatically play everything in a folder (I think Rockbox has a preference where it will do that, but that&#8217;s not what I want to do anywhere else). So I opened a song in Windows Media Player which is my default MP3 player on my laptop. Then I drag all of the songs in the folder into that window. Now I have a list of all the songs. Then there is a Now Playing drop-down list where I can choose &#8220;Shuffle List Now&#8221;. Then from that same list I can choose &#8220;Save List As&#8221; and then change the type to m3u instead of WMP&#8217;s default.<\/p>\n<p>Now I have a shuffled playlist. This is better than just regular shuffling because regular shuffling will repeat songs. The playlist it creates has all of these extra lines in it that start with #EXTINF. I&#8217;m not sure exactly what those do, but I think they help generate all of the song info faster. WinAmp playlists are the same way.<\/p>\n<p>I did a search for how to strip out the EXTINF lines and found a guy who knows way too much about DOS. He said that you should start a command window (Start:Run and type cmd is the fastest) then navigate to the folder you want to go to and type in the following magical line where +clean.m3u is the name of the playlist without the extra lines in it:<\/p>\n<p>findstr \/i \/b \/V &#8220;#EXTINF&#8221; &#8220;+downloads.m3u&#8221; &gt; &#8220;+clean.m3u&#8221;<\/p>\n<p>This is pretty good, but I still had a bunch of blank lines (I could probably get rid of them by modifying the command above, but I don&#8217;t know how to do that). So I opened the new file in Notepad, copied everything, pasted it into a blank Word document, and searched for ^p^p and replaced it with ^p. Then I selected all, copied, and pasted it back into the Notepad file. Finally, just delete the downloads.m3u file and rename clean.m3u.<\/p>\n<p>Here is what the switches mean:<\/p>\n<p>\/i Case insensitive<\/p>\n<p>\/b Match text at the beginning of the line<\/p>\n<p>\/V Print only lines that do not match the pattern<\/p>\n<p>Then you do the file name to look in and then type &gt; and the output file, otherwise it will just print it to the screen.<\/p>\n<p>Later I found out how to strip blank lines from a text file:<\/p>\n<p>findstr \/v &#8220;^$&#8221; &#8220;+clean.m3u&#8221; &gt; &#8220;+downloads.m3u&#8221;<\/p>\n<p>Now all you have to do is delete +clean.m3u since the original +downloads.m3u will be overwritten by this second command. Apparently ^ is the shortcut for beginning of line and $ is a shortcut for the end of a line, so an entire blank line is ^$.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m loading up the Archos now that it has a super big hard drive and can hold all of my music. I keep singles in a file called @Downloads. The @ is so that it sorts to the top of the list. But the Archos doesn&#8217;t automatically play everything in a folder (I think Rockbox &hellip; <a href=\"https:\/\/www.fiveforks.com\/ted\/2009\/09\/cleaning_up_playlist_files\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Cleaning Up Playlist Files&#8221;<\/span><\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-466","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/comments?post=466"}],"version-history":[{"count":0,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fiveforks.com\/ted\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}