I would suggest you just do something like:

shell '%comspec% /c dir /s/b c:\*.pst >c:\dir.txt'