Is there any wildcard for a digit in the command-prompt?
For example,
dir *.1*
Will list all files whose extensions start with 1.
|
Is there any wildcard for a digit in the command-prompt? For example,
Will list all files whose extensions start with 1. |
||||
|
No, MS-DOS supports only two wildcard characters (based on CP/M). They're "*", indicating any sequence of characters, and "?", indicating a single character. There is no distinction of alphabets and numerals in the wildcards and there is no support for regular expressions to constrain the wildcard to digits. |
|||
|
|
|
The answer to your literal question is 'no' - but if your real question is:
then if it's anything nt based (more specifically W2k plus) yes it can be done.
The trick is to use OR (what I would recommend) Edited as per OP comment: This will enumerate files using
More complex, but fast (uses specially prepared strings to allow piping to single instance of
or (functionally the same, but easier to read :>)
All examples as run directly from command line |
||||
?as a wildcard character, not*. Perhaps you mean the Windows Command Prompt (cmd.exe) instead? – Indrek Oct 19 '12 at 14:52