Windows keeps an 8.3 file name for every file to ensure compatility.
So if you have the files
test1.ext
test2.ext
test3.long
the last file gets stored with the alternative name
TEST3~1.LON
thus matching the pattern *1.*
.
You can execute dir /x
to see all 8.3 file names.
Fixes:
To strip all files in the directory directory
of their 8.3 name, execute
fsutil 8dot3name strip directory
To strip all files in the directory directory
of their 8.3 name, including those in subdirectories, execute
fsutil 8dot3name strip directory /s
To disable 8.3 file names on the drive drive:
(only affects newly created files), execute
fsutil 8dot3name set drive: 1
To disable 8.3 file names altogether (only affects newly created files), execute
fsutil 8dot3name set 1
For the complete syntax, execute
fsutil 8dot3name strip & fsutil 8dot3name set
Furhter information:
dir
and wildcard behaviour and the other question asks aboutdel
and the same wildcard behaviour doesn't actually make them different questions, Nifle. The behaviour of the wildcards in matching names is the core of the question. It's frequently asked, and this duplicate is almost in canonical form. grawity answered it twice before. So have I. These are all duplicates.