Understanding Wildcards
Wildcards are special characters that act as placeholders for other characters. They are incredibly powerful when you want to perform operations on groups of files rather than one at a time. The two most common are * and ?.
Usage:*
(Matches any sequence)
? (Matches single char)
*
Matches zero or more characters. e.g. *.txt matches all text files.
?
Matches exactly one character. e.g. file?.txt matches file1.txt but not file10.txt.
Real-World Examples
List all text files:
Command Prompt
C:\Users\User>dir *.txt
Match files with a specific pattern:
Command Prompt
C:\Users\User>dir img_??.jpg
Knowledge Check
1 / 2Which wildcard matches any number of characters?