if (!File.Exists(batFilePath)) { using (FileStream fs = File.Create(batFilePath)) { fs.Close(); } } using (StreamWriter sw = new StreamWriter(batFilePath)) { sw.WriteLine("mysql -u techu -p"); //techu is username sw.WriteLine("12341234"); // password sw.WriteLine("source H:\testscript.sql"); sw.WriteLine("@echo done"); //sw.WriteLine("pause"); }
using (StreamWriter sw = new StreamWriter(batFilePath)) { sw.Write("mysql -u techu -p"); //techu is username sw.Write("12341234"); // password sw.WriteLine(" < H:\testscript.sql"); sw.WriteLine("@echo done"); //sw.WriteLine("pause"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)