command prompt DIR with wildcard returns unexpected results

Posted by Don Dickinson on Server Fault See other posts from Server Fault or by Don Dickinson
Published on 2011-02-03T14:54:44Z Indexed on 2011/02/03 15:27 UTC
Read the original article Hit count: 273

Filed under:

I am running 2003 server (latest service pack). When i type this on the command line:

dir 2010*

or

 dir 2010*.* 

i receive this as the result:

    02/01/2011  02:34 PM             2,460 2011-02-01-14-34-23-807.mdn  
    02/02/2011  08:59 AM             3,757 2011-02-02-08-59-32-604.req  
    02/01/2011  09:16 AM               235 2011-02-01-09-16-35-104.dat  
    02/02/2011  05:06 PM               460 2011-02-02-17-06-05-166.log  
    02/01/2011  03:31 PM            66,570 2011-02-01-15-31-27-838.dat  
    02/01/2011  03:16 PM               145 2011-02-01-15-16-51-135.log  
    02/01/2011  08:52 PM         1,608,916 2011-02-01-20-52-57-416.req
                   7 File(s)      1,682,543 bytes  
                   0 Dir(s)  42,891,452,416 bytes free  

can anyone tell me why? i was expecting to see a list of only files that begin with "2010". there are no such files in the directory, so i wasn't expecting to see anything. i must either misunderstand how DIR handles wildcards or i'm doing something stupid.

© Server Fault or respective owner

Related posts about command-line