C#往bat文件中写地址信息遇到空格

往bat文件中写信息时如 start "C:\Program Files\VCG\MeshLab\meshlab.exe"这种

C#中,应先定义string 类型的变量str22

            string str22 = "start"+" "+@"""C:\Program Files\VCG\MeshLab\meshlab.exe""" + " " + "out" +num1.ToString() + ".ply";

            File.WriteAllText("3D-point2.bat", str22, Encoding.GetEncoding(936));

            RunBat(@point);

完后就可以了

猜你喜欢

转载自blog.csdn.net/u012785169/article/details/51158784