New
#1
Buffering the output of a "dir" command
I had a command prompt open in a directory that contained 8 files. I wanted to keep an inventory of the 8 files, so I ran the command:
C:\>dir > inventory.2015-06-03
When I looked at the contents of inventory.2015-06-03 I was surprised to find that it contained the inventory.2015-06-03 file itself, as a 0 byte file.
Is there a technique to buffer the output from the "dir" command before the ">" takes effect, so I don't get the extra file in my listing?