[fpc-devel] Running programs with output redirection

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sun Jul 17 11:59:45 CEST 2011


Ludo Brands schrieb:

> Start the shell instead of diff:
> 
>   exec('cmd','/c diff -r dir1 dir2 > diff.txt');
> 
> The /c tells the shell to execute the command and exit immediately.

Thanks, this comes close to what I had in mind :-)

But it looks quite platform dependent, like my other idea of invoking a 
shell script. Now I'll give TProcess and pipes an try...

DoDi




More information about the fpc-devel mailing list