private static void RepackMsgFile() { Console.Clear(); Console.Write("Insert path of .data and .text (without file extension): "); string dataPath = Console.ReadLine(); //Console.Write("Insert path of .text: "); //string textPath = Console.ReadLine(); string textPath = dataPath + ".text"; dataPath += ".data"; MSGFile.ReadRepackFiles(dataPath, textPath).Repack(); }
private static void RepackAllMsgFiles() { Console.Clear(); var files = Directory.EnumerateFiles(".", "*.text", SearchOption.AllDirectories); foreach (var file in files) { string textPath = file, dataPath = file.Replace(".text", ".data"); Console.WriteLine($"[{textPath}]"); try { MSGFile.ReadRepackFiles(dataPath, textPath).Repack(); Console.WriteLine("{0} file repacked!", textPath); } catch (Exception e) { Console.WriteLine($"Error ocurred in file {textPath}: {e.Message}"); } Console.WriteLine(""); } }