1

how to run a batch file using c++?

I dont know any thing about that

2
  • 1
    On windows? Is it a Win32 app, a .Net app? A vanilla console app? All these things (and more) affect the best place to start. Do you want to run the bat file as part of the build? Or as part of your finished, running app? Commented Aug 6, 2010 at 15:55
  • system ("C:\\batc.bat"), my batch file(batc.bat) is in the C directory. Commented Aug 6, 2010 at 16:41

1 Answer 1

1

Please see the system() function.

http://www.cplusplus.com/reference/clibrary/cstdlib/system/

Sign up to request clarification or add additional context in comments.

2 Comments

My scenario is I have to run a .bat file which is in another folder? what is Syntax for that if u can tell please?
how can i give the path of .bat file in your program

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.