static void Main(string[] args) { Console.SetWindowSize(150, 40); PrintWelcomeMessage(); DoOptions(); if (!Directory.Exists(path)) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("osu's song directory was not found. Do you even have osu installed?"); Console.ReadKey(); Environment.Exit(0); } // Create the destination directory if it doesn't exist if (!Directory.Exists(destination)) { Directory.CreateDirectory(destination); } // Goes through every beatmap's directory, gets the mp3 file from it and copies it to the destination folder. foreach (string dir in GetSongDirectories(path)) { if (!(File.Exists(GetSongFile(dir, "*.osu")) || File.Exists(GetSongFile(dir, ".mp3")))) { continue; } reader = new BeatmapFileReader(GetSongFile(dir, "*.osu")); string file = destination + reader.GetTitle() + ".mp3"; if (!File.Exists(destination + reader.GetTitle() + ".mp3")) { if (unicodeTitle) { Console.WriteLine("Copied: " + reader.GetArtistUnicode() + " - " + reader.GetTitle()); } else { Console.WriteLine("Copied: " + reader.GetArtist() + " - " + reader.GetTitle()); } File.Copy(GetSongFile(dir, "*.mp3"), destination + reader.GetTitle() + ".mp3", true); if (addMetadata) { if (metadataUnicode) { MetadataUtils.AddMetadata(file, reader.GetArtistUnicode(), reader.GetTitleUnicode()); } else { MetadataUtils.AddMetadata(file, reader.GetArtist(), reader.GetTitle()); } } } } MessageBox.Show("Finished exporting.", "osu! song exporter", MessageBoxButtons.OK, MessageBoxIcon.Information); // Opens the folder with the exported songs. Process.Start(destination); }