I'm trying to use a command line filter (to be exact, pas2dox to convert Pascal files to those understandable by Doxygen, but that's just a detaul, the issue is "global").
This filter takes a filename as input, and outputs the result to the console.
I can save the output to a variable, but not a file (that would be a feature request placed hereby
All you need to do in this case is disable recursive expansion of your variable when you write the contents to the file.
Say you variable is called %ProcessOutput% when you want to write this value to a file, reference it like this %!ProcessOutput%. The ! after the first % tells the FB parser not to attempt to recursively expand any variable references within the variable contents. You can find more on this within the variables section of the FB help file.
Wow, great, I didn’t know this exclamation mark trick, many thanks It’s not perfect, since the files all start with two lines (“Starting Directory:” and “Parameters:”), but since Doxygen seems to just skip those, everything works fine now!
You can prevent the “Starting Directory…” and “Parameters…” messages being logged by using Output Monitors.
Add two output monitors (via Runtime tab of the action -> Output Monitors), enable the ‘Use Wildcards’ option and set the behaviour to ‘Suppress any matching log messages’. Set the search strings for the Output Monitors to ‘Starting Directory:’ and 'Parameters:’ respectively.
This will suppress the two offending messages from the log (and your variable that you are logging to), so that the log will only contain the process output.