C# command prompt.

I have a program that builds an xml file for me but then I need to open the command prompt and enter:
1.D:
2.cd\rplcarts\createprogram
3. createprogram.exe "XML file" then enter

does anyone know how I could automate this in c#?

Recommended Answers

All 2 Replies

Hi moone009,
When your application creates this XML file is it always the same name? and in the same location?

Create batch file and run it from within the program.

batch file (c:\p.bat)

d:
cd\rplcarts\createprogram
createprogram.exe file.xml

To run batch ffile

System.Diagnostics.Process.Start(@"c:\p.bat");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.