Hi,
Obscure and painful question here, sorry.
I take the output of a dir /b command and I then roll it up into a string:
#include <Constants.au3>
$_pid = Run(@ComSpec & " /c dir " & $path & "*.ext /B", @SystemDir,@SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD)
While 1
$line = StdoutRead($_pid) ;read contents of STDOUT into $line
if @error Then ExitLoop ;if read fails, its the end of the list
$answer &= $line ;concatenate al