Hello,

I'am trying to get the output generated by the command
Code:

shell "ndir G: /spa"


into a text file.
I've tried :
Code:

shell "ndir G: /spa > C:\ndit.txt"
shell '%comspec% /c ""ndir G: /spa > "C:\ndit.txt"'


but both options give an error telling that this not the proper syntax for Ndir

while the folowing syntaxes in de cmd prompt work just fine :
Code:

ndir G: /spa
ndir G: /spa > ndir.txt



Can somone tell me what goes wrong?
Are some applications not working?

Thanks,

GP