Hi,

use cmd.exe with /c

Qt Code:
  1. QStringList arguments;
  2. arguments << "/c dir /b e:\\test\\*.txt | sort";
  3. QProcess exec;
  4. exec.start("cmd.exe", arguments);
  5. exec.waitForFinished();
  6. qDebug() << exec.readAllStandardOutput();
To copy to clipboard, switch view to plain text mode 
HTH, Bernd