How to run a . bat file from a C algorithm?

Asked

Viewed 638 times

1

I wonder how I could run an external file (a .bat, for example) from a C algorithm.

1 answer

1

It’s very simple, if you’re in the same directory just call it that:

system("nome.bat");

or you can call with the full path too, for example:

system("C:\\Users\\Lucas\\Desktop\\teste.bat");
  • 1

    It worked out right here! Fight, man!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.