Wildcard Character In File Names

Q

What are wildcard characters in file names?

✍: FYIcenter.com

A

wildcard characters in file names are special characters that Windows will them as match patterns to search for files. If any matches found, the given file name will be replaced with matched file names.

Many Windows commands support two wildcard characters in file names:

1. ? (question mark) - Used to match for any single character at the given position in the file name.

For example, if you type "gloss?.doc", you will locate the file "Glossy.doc" or "Gloss1.doc" but not "Glossary.doc":

C:\fyicenter>dir /b gloss?.doc
Gloss1.doc
Glossy.doc

2. * (asterisk) - Used to match for any number of any characters at the given position in the file name.

If you are looking for a file that you know starts with "gloss" but you cannot remember the rest of the file name, type "gloss*". This locates all files of any file type that begin with "gloss" including Glossary.txt, Glossary.doc, and Glossy.doc:

C:\fyicenter>dir /b gloss*
Gloss1.doc
Glossary.doc
Glossary.txt
Glossy.doc

 

Special File Names Used by Windows

File Name with or without File Extension

File Name and File Path

⇑⇑ Windows Batch File Tutorials

2021-04-15, 1461🔥, 0💬