|
It does. On Win 8.1...
c:\Windows>dir *.???
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of c:\Windows
11/18/2014 09:59 AM <DIR> .
11/18/2014 09:59 AM <DIR> ..
08/22/2013 09:36 AM <DIR> addins
08/22/2013 09:36 AM <DIR> ADFS
08/22/2013 09:36 AM <DIR> AppCompat
11/18/2014 09:09 AM <DIR> apppatch
12/02/2014 08:55 PM <DIR> AppReadiness
11/18/2014 09:55 AM <DIR> assembly
09/26/2013 02:22 AM 47,164 atiogl.xml
03/18/2014 09:46 AM 0 ativpsrm.bin
08/22/2013 05:21 AM 56,832 bfsvc.exe
08/22/2013 09:36 AM <DIR> Boot
08/22/2013 09:36 AM <DIR> Branding
10/20/2014 08:24 AM <DIR> Camera
11/28/2014 06:24 PM <DIR> CbsTemp
03/17/2014 09:04 PM <DIR> CSC
08/22/2013 09:36 AM <DIR> Cursors
03/18/2014 09:44 AM <DIR> debug
08/22/2013 09:36 AM <DIR> DesktopTileResources
08/22/2013 09:36 AM <DIR> diagnostics
08/22/2013 09:43 AM <DIR> DigitalLocker
03/17/2014 09:02 PM 2,664 DtcInstall.log
05/11/2014 12:35 PM <DIR> en-US
08/22/2013 12:51 AM 36,235 Enterprise.xml
08/23/2014 01:48 AM 2,374,784 explorer.exe
10/20/2014 08:24 AM <DIR> FileManager
08/22/2013 09:36 AM <DIR> Globalization
05/05/2014 08:59 AM <DIR> Help
08/22/2013 04:22 AM 973,312 HelpPane.exe
08/22/2013 05:32 AM 17,408 hh.exe
05/05/2014 08:59 AM <DIR> IME
11/18/2014 09:09 AM <DIR> ImmersiveControlPanel
12/01/2014 12:52 PM <DIR> Inf
08/22/2013 09:36 AM <DIR> InputMethod
05/11/2014 12:35 PM <DIR> ja-JP
08/22/2013 09:36 AM <DIR> L2Schemas
04/04/2014 07:41 AM <DIR> LiveKernelReports
03/20/2014 10:49 AM <DIR> Logs
10/20/2014 08:24 AM <DIR> MediaViewer
08/22/2013 01:01 AM 43,131 mib.bin
12/04/2014 03:44 AM <DIR> Microsoft.NET
04/24/2014 12:41 PM <DIR> Minidump
08/22/2013 09:36 AM <DIR> ModemLogs
08/22/2013 05:00 AM 217,600 notepad.exe
08/22/2013 09:36 AM <DIR> Offline Web Pages
03/17/2014 09:04 PM <DIR> Panther
04/24/2014 12:20 PM <DIR> PCHEALTH
08/22/2013 09:36 AM <DIR> Performance
11/18/2014 09:03 AM 613,588 PFRO.log
08/22/2013 09:36 AM <DIR> PLA
11/18/2014 09:09 AM <DIR> PolicyDefinitions
12/04/2014 03:44 AM <DIR> Prefetch
03/18/2014 02:39 PM 495,616 putty.exe
08/22/2013 04:57 AM 151,552 regedit.exe
08/22/2013 09:36 AM <DIR> Registration
09/29/2013 09:54 PM <DIR> RemotePackages
11/19/2014 04:48 AM <DIR> rescache
08/22/2013 09:36 AM <DIR> Resources
08/22/2013 09:36 AM <DIR> SchCache
11/18/2014 09:59 AM <DIR> schemas
09/29/2013 09:54 PM <DIR> security
08/22/2013 08:45 AM <DIR> ServiceProfiles
05/11/2014 12:35 PM <DIR> servicing
08/22/2013 08:45 AM <DIR> Setup
11/18/2014 09:31 AM 3,405 setupact.log
09/24/2014 08:29 AM 0 setuperr.log
04/24/2014 12:20 PM <DIR> ShellNew
09/29/2013 09:54 PM <DIR> SKB
04/22/2014 05:41 PM <DIR> SoftwareDistribution
08/22/2013 09:36 AM <DIR> Speech
08/22/2013 05:03 AM 125,952 splwow64.exe
08/22/2013 12:51 AM 35,891 Starter.xml
03/18/2014 01:47 PM <DIR> symbols
08/22/2013 09:36 AM <DIR> System
08/22/2013 07:25 AM 219 system.ini
12/03/2014 09:44 AM <DIR> System32
08/22/2013 09:36 AM <DIR> SystemResources
12/01/2014 12:43 PM <DIR> SysWOW64
08/22/2013 09:36 AM <DIR> TAPI
12/01/2014 02:42 PM <DIR> Tasks
12/04/2014 10:35 AM <DIR> Temp
11/18/2014 09:09 AM <DIR> ToastData
08/22/2013 09:36 AM <DIR> tracing
08/22/2013 09:36 AM <DIR> twain_32
08/21/2013 09:33 PM 51,712 twain_32.dll
09/29/2013 10:20 PM 5,446 vmgcoinstall.log
08/22/2013 09:36 AM <DIR> vpnplugins
08/22/2013 09:36 AM <DIR> Vss
08/22/2013 09:36 AM <DIR> Web
04/24/2014 12:19 PM 167 win.ini
12/03/2014 08:24 PM 1,947,077 WindowsUpdate.log
08/21/2013 09:57 PM 10,752 winhlp32.exe
10/20/2014 08:24 AM <DIR> WinStore
12/01/2014 12:44 PM <DIR> WinSxS
06/18/2013 08:54 AM 316,640 WMSysPr9.prx
08/22/2013 05:22 AM 10,752 write.exe
25 File(s) 7,537,899 bytes
71 Dir(s) 386,710,466,560 bytes free
c:\Windows>
Of course, I just noticed that dir *.???? pulls up the same thing as dir *.??? . So, there goes that.
Jeremy Falcon
|
|
|
|
|
On FAT, the directory entry only holds the 8.3 name, which truncates the extension to 3 characters.
Retriving the full name can be quite costly (think fat via network)
So the options were:
- stick to 8.3 file names on FAT. Ask people funny questions when copying from NTFS to FAT
- DOS tools can not operate on your beautiful files
- slow down
dir *.xls by orders of magnitude -
dir *.xls works different on C: than on D: (if you limit the "weird" behavior to FAT) - A three-letter filter also includes N>3-letter elements
- A myriad of other solutions that in hindsight would have been much better anyway and are oh so trivial to implement on todays machines (remember, Windows 95)
(I could come up with a few...)
I'm not saying Microsoft made the best choice. But I am saying we'd have the same complaints for any other option chosen.
Note that other commands such as del "xyz" do not include them.
|
|
|
|
|
del *.xlsx
dir *.xls
Problem solved
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
|
I think its a limitation of the dir command only resolving 3 character extensions.
Pretty sure it does the same on htm v. html.
Government is not reason; it is not eloquent; it is force. Like fire, it is a dangerous servant and a fearful master. ~ George Washington
|
|
|
|
|
I suspect it's looking at both the long and short names, rather than ignoring short names for files with long names.
In pseudo-SQLese:
WHERE shortname LIKE '%.xls' OR longname LIKE '%.xls'
rather than something like
WHERE IFNULL(longname , shortname) LIKE '%.xls'
|
|
|
|
|
|
Dir /X at least shows you why
I have three files in this test directory:
test.htm
test2.html
test3.htmasdflkjasdgf
If you do a dir /X (show short names of files) it lists the short names and you can see that the extension only uses first 3.
C:\Users\ns\test>dir *.htm /X
Volume in drive C has no label.
Volume Serial Number is 509B-CBCC
Directory of C:\Users\ns\test
12/04/2014 11:31 AM 9 test.htm
12/04/2014 11:32 AM 11 TEST2~1.HTM test2.html
12/04/2014 11:32 AM 11 TEST3~1.HTM test3.htmasdflkjasdgf
3 File(s) 31 bytes
However, I think it is stupid and annoying also.
ls *.htm works perfectly.
|
|
|
|
|
|
it is a "feature" so you find all your Excel files
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
But I can say dir *.xls* to do that when, and only when, I want to.
|
|
|
|
|
How do you know what you want to see? Only Microsoft knows what you want. Duh.
|
|
|
|
|
When I want to see what Microsoft thinks I want to see I use Bing Videos.
|
|
|
|
|
|
That's odd. It doesn't do that for me on Win 8.1.
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\jeremy.falcon>cd C:\windows
C:\Windows>dir *.lo
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of C:\Windows
File Not Found
C:\Windows>dir *.log
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of C:\Windows
03/17/2014 09:02 PM 2,664 DtcInstall.log
11/18/2014 09:03 AM 613,588 PFRO.log
11/18/2014 09:31 AM 3,405 setupact.log
09/24/2014 08:29 AM 0 setuperr.log
09/29/2013 10:20 PM 5,446 vmgcoinstall.log
12/03/2014 08:24 PM 1,947,077 WindowsUpdate.log
6 File(s) 2,572,180 bytes
0 Dir(s) 386,710,196,224 bytes free
C:\Windows>
Jeremy Falcon
|
|
|
|
|
Create a file with an extension like logger , or login , or something and try it. (I don't have 8.x handy.)
|
|
|
|
|
Well that's messed up. Apparently 3 is the magic number for extensions to cause the screw up. Check this out...
c:\>dir *.*
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of c:\
11/25/2014 02:35 PM <DIR> Code
12/04/2014 11:09 AM 0 cp.logger
08/22/2013 09:22 AM <DIR> PerfLogs
11/18/2014 09:48 AM <DIR> Program Files
12/03/2014 09:44 AM <DIR> Program Files (x86)
03/18/2014 07:59 AM <DIR> Users
11/18/2014 09:59 AM <DIR> Windows
1 File(s) 0 bytes
6 Dir(s) 386,709,864,448 bytes free
c:\>dir *.lo
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of c:\
File Not Found
c:\>dir *.log
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of c:\
12/04/2014 11:09 AM 0 cp.logger
1 File(s) 0 bytes
0 Dir(s) 386,709,864,448 bytes free
c:\>ren cp.logger cp.lo
c:\>dir *.lo
Volume in drive C has no label.
Volume Serial Number is 0000-0000
Directory of c:\
12/04/2014 11:09 AM 0 cp.lo
1 File(s) 0 bytes
0 Dir(s) 386,709,839,872 bytes free
c:\>
Jeremy Falcon
|
|
|
|
|
'Xac'ly, pull up a stool.
|
|
|
|
|
It does the same with htm and html files. I suspect it's only dealing with three significant characters for the extension.
|
|
|
|
|
Sigh. All of this arises from the FindFirstFile() [^] Windows API function, which matches both long and short filenames, when the underlying file system supports both. This is the case for NTFS, although you can turn short filename generation off.
Software Zen: delete this;
|
|
|
|
|
Gary Wheeler wrote: you can turn short filename generation off
Sounds good. How?
modified 4-Dec-14 13:21pm.
|
|
|
|
|
|
|
This is one of the things we did at my previous job when we shipped (surveillance) DVRs. Windows Explorer becomes incredibly slow when you have millions of files on a drive.
I have never seen a problem related to this setting.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
On Win7 the default is 2, so I disabled and stripped short names on my work volume. I'll do the same at home.
|
|
|
|