Page 1 of 1

$OUTPUTFILEPATH

Posted: Fri Jan 03, 2020 8:43 am
by MSpagni
To properly compare some files with EDP I need to call the apposite program (plug-in) that converts them to text.
The problem arises when the conversion output file must have a specific extension because its extension is what decides the output format. Of course, in this case the relevant extension is not the input one nor ".txt" (too easy! :wink: ).
Is it there a trick to specify the extension of $OUTPUTFILEPATH?

N.B. I like a lot the temporary output file having a unique filename like the one supplied by $OUTPUTFILEPATH.

At the moment I solved the problem using a batch file as follows:

Code: Select all

@program.exe -convert %1 "%~dpn2.oddext"
@ren "%~dpn2.oddext" "%~nx2"
Of course, the arguments are "$INPUTFILEPATH $OUTPUTFILEPATH"

Re: $OUTPUTFILEPATH

Posted: Fri Jan 03, 2020 1:56 pm
by psguru
I'm a little confused. $OUTPUTFILEPATH is used internally as an alternative to standard output. It is then used by EDP to read the converted text and compare, while still pretending it deals with the actual file. $OUTPUTFILEPATH also gets the same extension as the actual (input) file.

Re: $OUTPUTFILEPATH

Posted: Sat Jan 04, 2020 1:14 am
by MSpagni
psguru wrote: Fri Jan 03, 2020 1:56 pm $OUTPUTFILEPATH also gets the same extension as the actual (input) file.
Right that! The conversion program complains that input and output files have the same extension, so the same format, so nothing needs to be done...