Saturday, May 3, 2008

The Case of the Mysterious Underscore

Why does this happen?

>dir /b *_*

Foo+.pdf
Some File _Some City_.pdf

>

Highly weird. I'm pretty sure that the second file doesn't have any underscores.

Microsoft's excellent command-line reference provides an explanation.

>dir /x *_*

05/03/2008 09:32 PM 1234 FOO_~1.PDF Foo+.pdf
05/03/2008 09:28 PM 1234 SOMEFI~1.PDF Some File _Some City_.pdf
...


>