Simulating Wildcards (68268)
The information in this article applies to:
• Microsoft MS-DOS operating system 3.1
• Microsoft MS-DOS operating system 3.2
• Microsoft MS-DOS operating system 3.21
• Microsoft MS-DOS operating system 3.3
• Microsoft MS-DOS operating system 3.3a
• Microsoft MS-DOS operating system 4.0
• Microsoft MS-DOS operating system 4.01
• Microsoft MS-DOS operating system 5.0
• Microsoft MS-DOS operating system 5.0a
• Microsoft MS-DOS operating system 6.0
• Microsoft MS-DOS operating system 6.2
• Microsoft MS-DOS operating system 6.21
• Microsoft MS-DOS operating system 6.22
This article was previously published under Q68268
SUMMARY
You can simulate wildcards with the FOR command for those commands in
MS-DOS that do not allow wildcards. The structure of the command is as
follows
for %p in (set) do (command) %p
where %p is a variable used by the FOR command, (set) is a set of filenames
that command will be applied to, and command is the command to be carried
out. For example:
for %p in (*.txt) do type %p
for %p in (*.txt) do find "CONFIG" %p
Modification Type: |
Major |
Last Reviewed: |
5/12/2003 |
Keywords: |
KB68268 |
|