0

This might be a very specific question, but how do I execute a batch file in a sub folder above the c# application; I am trying to reference the batch file using a button:

    private void testButton_Click(object sender, EventArgs e)
    {
        System.Diagnostics.Process.Start("test.bat");
    }
1

1 Answer 1

0

Try

private void testButton_Click(object sender, EventArgs e)
{
    System.Diagnostics.Process.Start(@"..\test.bat");
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I did not realise I had to include "System.Diagnostics"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.