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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute a *.COM or *.BAT file from Delphi? 1

Status
Not open for further replies.

apostolchopov

Programmer
Jun 8, 2004
53
BG
Hi, guys!
Could you tell me how to execute a *.COM or *.BAT file from Delphi?

Regards!
 
It is also worth doing a google search first before posting here. The chances are many people have asked the same question as you in the past (unless it's cutting edge stuff!!).

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
In the same way as you would execute a .exe, or any other execuatble file.


Steve: Delphi a feersum engin indeed.
 
There is a unit fmxutils.pas with a function ExecuteFile(..).

Just use the unit in your project and then just write something like that
..
ExecuteFile('filename.bat',FileDir,',1);
...

Just check the spell and the parameters because I don't remember all of them now.

Spent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top