[fpc-pascal] Linux - ExecuteProcess versus fpSystem

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Fri Sep 9 09:24:48 CEST 2011



On Fri, 9 Sep 2011, Marco van de Voort wrote:

> In our previous episode, brian said:
>> write a batch file for the actual conversions.
>>
>>
>> What are the commands?
>>
>> mpg321 -q -w "tempfile.wav" "inputfile.mp3"
>>
>> oggenc -Q --output="outputfile.ogg" "tempfile.wav"
>> between the ExecuteProcess and fpSystem calls, I just commented out
>> the one I wasn't trying. The two lines of code are
>>
>> 	Status := ExecuteProcess(CommandString, ParamString);
>
> That's probably the problem. You use ", which might be problematic with
> commandline separation and don't offer the commands to exexuteprocess in a
> separated matter.
>
> Try
>
> Status:=ExecuteProcess('/path/to/oggenc',['-Q','--output="outputfile.org"','tempfile.wav']);

You must remove the quotes around 'outputfile.org':

  Status:=ExecuteProcess('/path/to/oggenc',['-Q','--output=outputfile.org','tempfile.wav']);

Michael.



More information about the fpc-pascal mailing list