MATLAB: Why I cannot list specify files with function dir

dirdirectoryMATLABmatlab function

I want to list all special files with specified extensions, such as all *.jpg files. I cd the matlab to the current folder, and call the dir function as following:
dir *.jpg
it does not return all file names but a struct with name attribute and other fields, like the following picture showing
If I call dir function as following:
dir
it will return all files
I just want to list all jpg files, but not including the root directory, how to use dir function, please?

Best Answer

Guillaume is right: You have created a file called '*.jpg'. This is not possible under Windows with standard tools, but you can do this under Linux or with using evil tricks. I suggest to start your machine from a Linux live CD or USB stick and delete the file '*.jpg'.
You can install the Linux subsystem: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc771470(v=ws.11) (here for Windows 7) and delete the file from there.
This works for a trailing dot in the file name, which is illegal also:
system('del \\?\D:\Temp\asd.')
I cannot test this with a * in the name, because I'm not able to create such a file...
A chkdsk might fix the file name also.