/* http://zenipex.com/progs/ * Version: 1.0.01 * * pspm3ubatch == PSP .m3u Batch Generator (for Linux) * by Mitchell Keith Bloch * bazald@zenipex.com * * When run in the root music directory of the PSP, this * program will wipe all existing .m3u files and replace * them with alphabetically ordered .m3u files titled * after their respective directories. * NOTE: Relies on pspm3udirgen * * Cartman License: * "Whatevah! Whatevah! You do what you want!" */ #include #include using namespace std; int main(int argc, char *argv[]) { if(argc < 2) { cout << "Usage: pspm3ubatch */\n"; return 1; } string dir; for(int i = 1; i < argc; ++i) { dir = argv[i]; if(dir.at(dir.length() - 1) == '/') dir = dir.substr(0, dir.length() - 1); else continue; system((string("cd \"") + dir + "\" && `rm -f *.m3u; pspm3ugen *.mp3 > \"" + dir + ".m3u\"; cd ..`").c_str()); cout << dir + ".m3u generated.\n"; } return 0; }