中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 17:23
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » One-line tip: ? and *
Printable Version  1,711 / 2
Floor1 MYS Posted 2002-11-18 00:00
元老会员 Posts 1,637 Credits 5,170 From 广东佛山
? and * are both filename wildcards used by DOS. The difference is that one ? can stand for any one character in the current position, while * can stand for many characters.
For example, suppose the current directory has the following files

a.cab a1.bas b1.bas abcd.bas ab.bas

dir a?.bas will list a1.bas ab.bas
dir a*.bas will list a1.bas abcd.bas ab.bas
dir ?1.bas will list a1.bas b1.bas
dir *1.bas will list a1.bas b1.bas abcd.bas ab.bas, and the 1 after it has no effect here
dir *.* will list all files
Floor2 凡秋 Posted 2003-06-07 00:00
初级用户 Posts 2 Credits 113
Then what if it's dir *2.bas???
Floor3 Roy Posted 2003-06-07 00:00
管理员 Posts 1,633 Credits 4,869
The following is quoted from 凡秋 on 2003-6-7 8:28:47:
Then what if it's dir *2.bas???

Then it becomes dir *.bas.....
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023