Here is the content of the directory:
λ dir /b "..\src\"
main.c
main.c_
main.c2
main.cpp
main.cpp_
main.cpp2
This works as expected:
λ dir /b "..\src\*.c"
main.c
This doesn't:
λ dir /b "..\src\*.cpp"
main.cpp
main.cpp_
main.cpp2
Why does this wildcard match main.cpp_ and main.cpp2?
What is a working solution to list only *.cpp files in a directory?
EDIT: it is not a duplicate of cmd has wildcard bug?
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] NtfsDisable8dot3NameCreation=1to disable - default is enabled. – DavidPostill Sep 10 '15 at 12:51