Question : Running DOS program from Dellphi

I have a program which has to be run from the Command prompt passing two file names.  I have in the past just opened a Command window and typed in the program and the two file names and all has been fine.

Now I have a lot of files to process with the program so would like to use ShellExecute etc. from a Delphi 7 program.

Have tried to figure out what to do but nothing seems to work.

Any Ideas

Answer : Running DOS program from Dellphi

Thinking laterally - it might be easier to create a batch file to do this rather than writing delphi code.
Use an input redirect to feed the return:

Batchfile.bat:
c:\protlisp.exe source1.txt target1.txt <Return.txt
c:\protlisp.exe source2.txt target2.txt <Return.txt
c:\protlisp.exe source3.txt target3.txt <Return.txt

In return.txt, have just a single Return character

This would also lend itself to using file searches etc from the batch file,  error checking etc.

Random Solutions  
 
programming4us programming4us