Glob pattern can be used as parameters of a command.
Example:
- the 'DIR' command lists all files in a directory.
- the 'DIR' command with the parameter *.txt shows only files with the extension '.txt'
Type at the prompt (in my case D:\test>)
DIRand press 'ENTER'. The output contains -among other things- all the files in the current directory, the entry of the subdirectory 'my Doc' inclusive.
22-01-2016 | 11:06 | <DIR> | . | |
22-01-2016 | 11:06 | <DIR> | .. | |
22-01-2016 | 11:06 | <DIR> | my Doc | |
22-01-2016 | 11:07 | 1 | file1.txt | |
22-01-2016 | 11:07 | 1 | file2.dat | |
22-01-2016 | 11:07 | 1 | file2.txt | |
22-01-2016 | 11:07 | 1 | file3.txt | |
23-01-2016 | 12:18 | 85 | pic001.jpg | |
23-01-2016 | 12:18 | 123 | pic002.jpg | |
25-01-2016 | 19:34 | 5.852 | musicBach.mp3 | |
25-01-2016 | 19:40 | 7.966 | musicBrahms.mp3 |
DIR *.txtand press 'Enter'. The result is a list of all files with only the extension '.txt'
DIR /OD-after pressing 'Enter'- lists all files by date. To learn more about the 'DIR' command, type at the prompt
DIR /?and press 'Enter'.