in reply to differences in dir?
My guess is that 'dir' is a program in your path somewhere and the first instance is able to run 'dir' directly while the second instance, having ">" in the command string, goes directly to passing the command to cmd.exe, which uses its built-in "dir" command.
Note that if you didn't have a 'dir' program in your $ENV{PATH}, then the first instance would try to run 'dir' directly, fail, and then resort to passing the command to cmd.exe, giving the same output as your second version.
- tye
|
|---|