batch file - Strange Behavior with Wildcards and DIR Command in Command Prompt -
i've noticed when using dir in windows command line 1 particular case wildcards don't function i'd expect. example:
dir *.doc
runs similar
dir *.doc*
i've noticed behavior when wildcard directory precedes period (which important , frequent case). whats stranger if run either:
dir *.d dir *.do
it execute expected. it's once hit 3 character extensions strange behavior starts. mentioned runs similar command above because if contents after *. not extension not return file. e.g.:
dir *.tar
will not return file.tar.gz will return file.targa
why , how can avoided?
the extension part after last dot. before last dot filename, including dots ordinary characters.
also remember dir matches short , long names.
Comments
Post a Comment