Only doing this because I am lazy. I just wrote a program to list all my music into an excel file.
import java.io.*;
import org.apache.commons.io.FileUtils;
public class NewClass {
public static void main( String args[] )
{
File folder = new File("C:/Users/Public/Music/OldMusic");
File[] listOfFiles = folder.listFiles();
for (int i = 0; i < listOfFiles.length; i++) {
try{
FileUtils.writeStringToFile(new File("test.xls"), listOfFiles[i].getName(), true);
BufferedWriter output;
output = new BufferedWriter(new FileWriter("test.xls", true));
output.newLine();
output.close();
}
catch (IOException e){
}
}
}
}
The code works fine, but at the end of every song there is .mp3 (i.e.: Metallica - Nothing Else Matters.mp3).
Is there a way just to have the Name of the song without the .mp3 at the end of it?