Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi command line

Status
Not open for further replies.

Neoyanderson

Programmer
Apr 18, 2004
16
US
hello, I want to execute multiple commands in the same command prompt window session... does that mean i won't be able to execute back to back system() functions? if so then how should i tackle this problem? do I need to build some outside file (batch?) How does that work?
 
Writing a Batch File and excuting it at one stretch in your program is the best solution. Otherwise if you want a single line in cmd prompt separate the commands with a "&" symbol....

c:\dir & notepad

will list the directory files as well as open notepad.



Cheers,

Ravi
 
you may also use function CreateProcess or exec family functions.

Ion Filipski
1c.bmp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top