is it possible ?

This is a discussion on is it possible ? within the C++ Programming forums, part of the General Programming Boards category; is it possible to make a .bat file in c++ and run it ? and if so, can you guide ...

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    19

    is it possible ?

    is it possible to make a .bat file in c++ and run it ?

    and if so, can you guide me a bit cause i have been googling this for weeks now

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,546
    > is it possible to make a .bat file in c++ and run it ?
    Yes.

    > and if so, can you guide me a bit cause i have been googling this for weeks now
    With what?
    Creating the file, or running it?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    19
    Quote Originally Posted by Salem
    > is it possible to make a .bat file in c++ and run it ?
    Yes.

    > and if so, can you guide me a bit cause i have been googling this for weeks now
    With what?
    Creating the file, or running it?

    i think i can run it with

    Code:
    system("c:\\this\\is\\where\\my\\batfile\\is.bat");
    right ?

    if not i need help with both
    Last edited by Jalabert; 09-12-2005 at 06:51 AM.

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    33
    yes, the system command can run the bat, and yes, C++ can create a batch file. basic fstream commands. Check here http://www.cprogramming.com/tutorial/lesson10.html and instead of .txt use .bat ... your on your own after that, thats all the info you need
    Last edited by Warhawk; 09-12-2005 at 04:25 PM. Reason: an opps

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21