in reply to differences in dir?

This is just a wild guess (ain't got no windows), but it is possible dir has a different output when redirected to a file, like ls does on Linux.