Board index » delphi » Newbie help: executing MS-DOS commands using Delphi

Newbie help: executing MS-DOS commands using Delphi

Use the Api function 'ShellExecute' or WinExec:

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShellExecute(0, 'open', 'C:\test\Pkzip.exe', 'C:\a*.*', nil,
sw_ShowDefault);
end;

--
--------------------------
Regards,

Mathias Nyman
Sweden
http://www.se-datateknik.se/delphi
zio...@hem.passagen.se.nospam
--------------------------

B Marfell <bmarf...@es.co.nz> skrev i
diskussionsgruppsmeddelandet:950215896.898...@Chaos.es.co.nz...

Quote
> Hi,
>     I was thinking of creating my own smaller version of Winzip, but am
> unsure how I would go about coding it so that the Onclick event of a
button
> would execute the following MS-DOS command (for example):

> c:\test\pkzip c:\a *.*

> I apologise if this is the wrong Newsgroup to be asking this sort of
> question.
> Cheers,

> P.S. Could u please respond to: bmarf...@es.co.nz

 

Re:Newbie help: executing MS-DOS commands using Delphi


Hi,
    I was thinking of creating my own smaller version of Winzip, but am
unsure how I would go about coding it so that the Onclick event of a button
would execute the following MS-DOS command (for example):

c:\test\pkzip c:\a *.*

I apologise if this is the wrong Newsgroup to be asking this sort of
question.
Cheers,

P.S. Could u please respond to: bmarf...@es.co.nz

Other Threads