Playlist creator for mp3s and wma's

I wrote the following pretty quickly this morning to traverse a directory and it's child directories to look for any mp3/wma files in that directory and make a windows media m3u playlist (basically, the file names separated by newlines).
I thought I'd post it if anyone needs it or if anyone can find something I'm overlooking. It seems to work correctly, but it's hardly tested well.
-Chuck
// PlaylistCreator.java source file
// By Chuck Reed
// Usage: Creates a folder playlist for any folder or subfolder containing mp3 files
// This program will need the java file IO utilities
import java.io.*;
// The main class for the playlist creator
public class PlaylistCreator
  private static String CurrentDirectory;          // A member to keep track of the current directory
  private static File WorkingFilePointer;          // The location of the working file's pointer
  private static String[] FileNames;               // Array of file names read in from directory
  // The main class to drive the playlist creator
  public static void main(String args[])
    try
       // Find our directory name and pointers, then run the recursive directory processor
           WorkingFilePointer = new File(System.getProperty("user.dir"));
           ProcessAllDirs(WorkingFilePointer);
      } catch (Exception e)
      // If something fails, catch the exception
        System.err.println(e);
  // This is the method that actually creates a playlist file in the current directory
  private static void CreatePlaylist(File CurFilePointer)
    try
      // Store the file names and initialize the mp3 counter
        int Mp3Count = 0;
      FileNames = CurFilePointer.list();
      // If we don't have anything in the folder, return doing nothing
      if (FileNames == null)
        return;
      // Loop through all of the files returned in this directory
        for (int i = 0; i < FileNames.length; i++)
            if ( IsMp3File(FileNames) )
Mp3Count++;
// If we don't have any mp3s to make a list of, bail
if (Mp3Count < 1)
          return;
// Create the output stream and format it properly
          PrintStream OutputStream = new PrintStream(
          new BufferedOutputStream(
                                                            new FileOutputStream(CurFilePointer.getAbsolutePath() + "\\00 - FolderPlaylist.m3u")));
// Loop through all of the files we have in the directory
for (int i = 0; i < FileNames.length; i++)
     // See if mp3 is at the index of length - 4
          if ( IsMp3File(FileNames[i]) )
// Print out the mp3 file name to the next line of the playlist
          OutputStream.println(FileNames[i]);
// Close the playlist file
OutputStream.close();
} catch (Exception e)
// Catch and report any exceptions we get
     System.err.println(e);
// Recursive function to visit each subdirectory in the directory structure and create playlists
private static void ProcessAllDirs(File dir)
// If our current location is a directory, lets check it for subdirectories or mp3s
if (dir.isDirectory())
// Call create playlist on our current directory in case we have mp3 files here
CreatePlaylist(dir);
// Get a list of all subdirectories
String[] children = dir.list();
// Loop through the child directories
for (int i=0; i < children.length; i++)
// Call this function recursively on the child directory
ProcessAllDirs(new File(dir, children[i]));
// A method to determine if a file ends in .mp3 or .MP3 or .WMA or .wma
private static boolean IsMp3File(String name)
// We can't have anything valid with a length of under 4
if (name.length() < 4)
     return false;
// If we have the correct file suffix
if ( (name.indexOf(".mp3") == (name.length() - 4)) || (name.indexOf(".MP3") == (name.length() - 4)) ||
     (name.indexOf(".wma") == (name.length() - 4)) || (name.indexOf(".WMA") == (name.length() - 4)))
// We return true
     return true;
// Otherwise, this isn't a valid mp3 file
     return false;

I have also Paid this morning, approximately 3-4 hours ago, and cannot play from my phone, or play ad free on my mac.
This quite frankly pisses me off and this is unacceptable. I paid money for your service which doesn't even work. Sooo give me a free month or fix your problems. I don't pay your company money for **bleep** that doesnt work.
I've recevied my Receipt of payment already, and it's processed through my bank account. This does not make me very happy at all. 

Similar Messages

  • Can't Import mp3s and wmas to itunes

    hi,my problem is that there are some mp3 and wma songs i have on my mac but when i try to put them on my library or basically try to listen to them on itunes nothing happens.i drag and drop them into library or manually import them but itunes just doesn't respond i even tried to manually open the directory music>itunes>itunes music>automatically add to itunes and dragged these mp3s into it but it just keeps ignoring them and throws them into a directory called 'not added'.can anyone help me?

    iTunes for Mac (unlike iTunes for Windows) cannot convert WMA files. You will need to use another Mac program, such as EasyWMA, to convert them into an iTunes compatible format.

  • HT1550 Convert multiple mp3 and wma at once in aac

    Hello All,
    I'm new at using iTunes, used to listen to my music in flac format with a Sandisk Sansa Clip+ (with a Rockbox rom).
    I've burned some of my CDs in mp3 and wma formats before burning them all again but in flac.
    Now with my brand new iPhone 5 16Go, I guess I'm better of using compressed format for keeping requiring space as little as possible.
    But in the online help http://support.apple.com/kb/HT1550 the steps, describing how to convert files in aac or whatsoever, make me lost.
    Select one or more songs in your library, then from the Advanced menu, choose one of the following (The menu item changes to show what's selected in your Importing preferences):
    Create MP3 version
    Create AAC version
    Create AIFF version
    Create WAV version
    Create Apple Lossless version
    If you haven't imported some songs into iTunes yet, you can import and convert them at the same time. This will create a converted copy of the file in your iTunes Library based on your iTunes preferences. To convert all the songs in a folder or on a disk, hold down the Option key (Mac) or Shift key (Windows) and choose Advanced > Convert Import preference setting. The Import preference setting will match what you chose in step 3. iTunes will prompt you for the location of the folder or disk you want to import and convert. All the songs in the folder or on the disk will be converted.
    I did the setup of Import setting. But those "Advanced" menu are not water clear for me.
    It's step 4 in the document.
    How may I select which songs I'd like to import and convert?
    Using Add to Library import them, then in iTunes, I select them all, then I have to go to File>Create New Version>Create AAC version.
    Only Create AC version remains dimmed if I don't have any songs in my Library.
    Therefore where am I supposed to press down Option key to make appearing the Advanced>Convert Import preference setting ?
    I'm lost.
    The only I found is to Add to Library, then Create new version, create AAC version.
    Thanks for your help.
    Kind Regards.

    After searching the forums I found a 3rd-party program called 'MP3 Trimmer' available at 'http://www.deepniner.net/mp3trimmer/'
    Once you have the application, go to Tools > MP3 joiner and you will find a window to drag and drop the audio files you wish to join.
    Select your target folder and wait for the conversion to complete. The end resulted in a single .mp3 file virtually the same size as all the previous files were collectively. I added the file to iTunes but decided not to convert it to AAC, though you can if you want to.
    There are some restrictions that apply, such as 'CBR and VBR MP3's cannot be joined together'... You can find out more about these in the Help section.

  • Mixture of mp3 and wma files on my muvo

    I got a muvo tx last week as a gift. I copied about 250K of mp3 and wma files to it from my laptop running windows xp pro. The player plays all of the mpe files with no problem but won't play any of the wma files. The wma files were ripped from a cd using Windows Media Player.
    Any advice on playing the wma files will be appreciated. The little manual that came with the player says it will play mp3, wma, and wav files.

    JimR,
    For WMA audio files with DRM protection, you will need to use either Windows Media Player or Creative MediaSource application to do the transferring of the files to the player. Only by using these application can the license be transfer to the player to allow playback.
    Try ripping the Audio CD again but this time go to the Windows Media Player 9 setting option and ensure that the 'Copy protect music' option is disabled.
    Jason

  • Help!- MP3 and WMA files no longer playing on my Micro Pl

    I have a 52mb micro plus that I got in September 2005. All of a sudden, I can longer play my mp3 and wma files... just the radio. I have updated my creative zen file organizer, I have a full powered battery inside, I have done no significant damage to the player (I dropped the player once on the sidewalk but not from a big distance or very hard), and I really can't think of anything else that is causing the problem. Can someone please help me fix my player so I can start playing my music files again? Thank you.Message Edited by jjc92787 on 05--200707:0 AM

    No unfortunately not. I don't know how to escalate this to Apple tech but I think that is the next step as I believe it is IOS based problem, not user related.

  • Can't transfer some .mp3 and .wma file

    I have recently purchased a Zen V plus MP3 player and updated the software and firmware for it.
    While I have successfully transferred a lot of my music mp3s and some of my audiobook mp3s, there are a few of my audiobook mp3s that won't transfer because it tells me that they are not in a supported format.
    I also had this problem when trying to transfer a .wma file.
    The thing is that I have been able to transfer these same files to another mp3 player (not Creative) without any problems.
    Can anyone help with a possible solution please?

    Do you have songs purcahsed by friends or family?
    As stated, you can only have songs from 5 different accounts sync'd to an iPod.
    See this -> Track Down Purchases
    "This script will examine each track in a selection of tracks or a playlist to determine if it was purchased from the iTunes Store and then copies it to a discrete playlist named for the person who purchased it, eg: "Steve Ballmer's Purchased Music". Recognizes song, video, and audiobook purchases. Purchaser information is gleaned by examining the track's file. Takes about one second per track, give or take, depending on computer speed, just so you know">

  • How do I convert music when there is a mixture of mp3 and wma and alot of music?

    So I recently bought a Mac Book Pro, and had all my music from my old laptop put on a new external hard drive. The problem is some of the music is mp3 and some is wma and I have 9000 songs and don't want to go through each one to covert. What is the simplest was of coveting everything to mp3?

    You will have to use a third-party program to convert WMA files, iTunes won't do it.
    If you have WMA and MP3 files in the same folder, go into list view in the Finder and click on the top of the 'Kind' column to sort by kind and separate them. (If the 'Kind' column doesn't show, enable it in Finder menu 'View'>'Show View options'.
    You can then move all the MP3s into a separate folder. These can be imported directly into iTunes.
    This will leave the WMA files; you will need to look for a program which can batch convert them.

  • Why did they take away the playlist feature for movies and tv shows?

    The subject line pretty much sums it up but does anyone know why they took it away? It was seriously the greatest thing ever with my kid's tv shows. I could just turn on the playlist and they could watch a few episodes back to back without having to mess with the remote.

    I don't think they have.
    A recent software update may have reset your Settings which by default is playlists only for music.
    Check AppleTV Setting menus and enable playlists for all not just music.
    Let me know if you can't find the setting in the menu.
    AC

  • Digital out for mp3 and

    I have a computer which I use for both listening to mp3s and for watching DVD. I take a digital output from the sound card to my AV receiver (DENON AVR604). With my current sound card (Hercules Digifire 7.) I have to reset the sound card between getting 5. encoded digital output with PowerDVD player, and getting the normal digital output from playing mp3s etc, which involves rebooting the computer each time. I run Win XP pro.
    Is there a sound blaster card which would automatically give me 5. digital output from DVDs and normal stereo output at other times without me having to reset anything ?
    thanks

    Catherina, How do you set the SB card to not decode the AC3 track? My Denon doesn't detect that a DTS/Prologic signal is being sent, and from the Knowledge base it appears that this is caused by the card decoding the signal instead of the receiver.
    Simply I want my receiver to decode the AC3 data thru the optical cable.

  • Difference between MP3s and WMA

    Hi all,??just wondering what is the difference between these two formats? And also, what is the better quality to use?CheersJim

    wma is windows media audio and is basically windows own version of mp3. it is better in quality and wma 64bit rate is equivalent to mp3 28bit rate.hope that hel
    ps.

  • ITunes library - MP3 and WMA

    Hey!
    I tried to find solution to my problem, but no success. I have about 30GB audio library with many WMAs. I would like to transfer everything to MP3 or other iTunes format. Is it possible that iTunes automatically copy evrything to new folder and transfer only WMAs, so I can after transformation simply delete old library and strat using new one?
    Thank for help!

    The converted file will be in your iTunes music folder (same as the originals).
    The manual way to delete the dupes is to open iTunes, go to "view", and click "show duplicates".
    Then highlight the duplicates then select "edit/delete".
    Or right click on highlighted files and select "delete".
    There is a script for Windows that will do this.
    Teridon's iTunes scripts for Windows.

  • How can I use an external player for MP3 and MP4 fomats without disabling native HTML5 playback support for mpeg formats that are embedded in webpages?

    The Application options were poorly implemented, resulting in multiple instances of handlers for some formats in a long and confusing list. Now Mozilla seems to have solved that problem by preventing users from choosing how various media formats are to be handled -- the cure is worse than the disease! I am getting damned tired of researches into how this or that poor new decision in Firefox's development can be overruled, circumvented, or lived with. How can I choose how an .mp3 file is to be played, and what is going on at Mozilla that I have to ask?

    Right-click the link and choose Save Link As to download the file. Afterwards, click the Downloads button on the navigation toolbar and left-click the downloaded file. This will open it with the associated application.
    * [[Find and manage downloaded files]]
    Setting ''media.windows-media-foundation.play-stand-alone'' to '''false''' in [http://kb.mozillazine.org/About:config about:config] is the only way to prevent files like MP4 and MP3 being played inside the browser when left-clicking the links, until the preferences for handling such files are properly fixed at some point in the future. That will happen whenever a developer finds the time to write a patch.

  • Ringtone Creator For Mac And Verizon?

    Just wondering if anyone knows of any good Ringtone Creator software that is compatible for Verizon phones and Macs (obviously).
    Thanks so much.
    Steve

    Check out Xingtones.

  • HT1589 Why does creating a new library only look for mp3 and AAC files. why not ALAC and AIFF ?

    I want to add a new library so i can use on sepcific devices. However it does not att AIFF or ALAC files. I always import using AIFF into my standard library.
    If i want to use only mp3 files in the new library do i have to create them first in my standard library then they will appear in the new library. then delete from the original library but keep files?
    Thanks
    Stu

    Palace1971 wrote:
    Thanks for info
    However when i created new library it only imported 30% of the music i have
    Then it may have stalled, ot there could be permissions problems... Try adding the folder again or use iTunes Folder Watch.
    Also i dont want to downsample to 128k. i want to use 320k and still have best quality without using lossless formats to put on the iPhone
    iTunes can now downsample to 128k, 192k or 256k...
    Also i dont want to see 2 of each song in one library
    thats why i want to use two different libraries.
    Yep, that bit I get, but switching in and out of libraries and trying to keep things up to date is easier said than done. I'm just trying to point out there might be an acceptable alternative that is easier to manage.
    tt2

  • Layered video problem Overlay Creator for iPad and Adobe content viewer

    Consultation in English:
    A top layer contains different elements, the layer below it is a video contentdisplayed on the viewer does not respect the position viewing the video, above all, is there any option to correct the problem, I am aware of your comments, thanks.
    Visualization InDesign (vector layer above the video)
    Visualization Content Viewer (Top video vector layer)
    Consultation in Spanish:
    Una capa superior contiene diferentes elementos, la capa que se encuentra abajo de ella un video, al visualizar en content viewer no respeta el posicionamiento visualizando el video por sobre todo, hay alguna opción de corregir el problema, quedo atento a sus comentarios, gracias.

    Thanks Johannes, works great but I can not hide the video driver, you can do when giventhe option to autoplay?

Maybe you are looking for

  • Here maps in Asha 210

    I want to buy Asha 210 but let me know the following: 1. I use HERE MAPS on my Lumia 620, can i use the same offline maps in Asha 210. How if yes(because asha 210 has got very less internal memory). If no, provide me an alternative to here maps. 2. C

  • W510 - Cannot go into sleep mode

    The latest patches do not fix this issue, and not only W510 but also all series have the same issue. edit note:- Title changed to suit the issue. Solved! Go to Solution.

  • Using 2G shuffle with speakers while simultaneously charging

    I currently listen to my 40GB iPod photo at work through logitech mm50 speakers for 8-10 hours a day. I bought a 2G shuffle to use at work instead, because I've already dropped the big iPod from 30 feet up (I'm a carpenter...was working on a church b

  • What is the complexity of List.subList()?

    I realize that the complexity of List.subList() probably varies, so is there a complexity for subList() when using a LinkedList and and ArrayList? From the description in Abstract set, It sounds like subList() returns the same list, except with some

  • Ink/Cartridge issue with my OfficeJet Pro 8500A Plus

    My OfficeJet Pro 8500A Plus has been drinking color ink.  We rarely print color, as we purchased this unit for its fax/copy capabilities (almost all B&W).   Upon recent replacement of the Cyan and Yellow cartridges, the system refuses to operate.  Th