China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 14:20
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Querying DIR parameters View 1,929 Replies 4
Original Poster Posted 2009-05-01 02:04 ·  中国 湖北 宜昌 电信
初级用户
Credits 47
Posts 41
Joined 2009-04-24 02:17
17-year member
UID 143654
Gender Male
Status Offline
To query all MP3 files under drive E:

The commands DIR /S/B E:\*.MP3 and DIR E:\*.MP3 /S/B both work, but DIR E:\*.MP3 does not. Why is it necessary to have parameters?
正在学习中……
Floor 2 Posted 2009-05-12 06:41 ·  中国 北京 联通
中级用户
★★
Credits 325
Posts 155
Joined 2007-08-14 14:16
18-year member
UID 95120
Gender Male
Status Offline
/s means including subfolders. Your mp3 files are placed in a folder. If you place them in the current directory, you don't need parameters.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
yangfengoo +1 2009-05-18 01:09
Floor 3 Posted 2009-05-12 21:28 ·  中国 广东 东莞 电信
新手上路
Credits 14
Posts 7
Joined 2009-05-09 00:49
17-year member
UID 144682
Gender Male
Status Offline
The parameter /S has the meaning of searching. If this parameter is not present, all MP3 files in drive E: cannot be found, only the MP3 files in the root directory of drive E: can be found.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
yangfengoo +1 2009-05-18 01:10
Floor 4 Posted 2009-12-17 00:04 ·  中国 北京 联通
初级用户
Credits 44
Posts 36
Joined 2009-03-17 11:36
17-year member
UID 141561
Gender Male
Status Offline
DIR attributes]]
sortorder]] timefield]]


Specifies the drive, directory, and/or files to list.

/A Displays files with specified attributes.
attributes D directory R read-only file
H hidden file A file ready for archiving
S system file - prefix meaning "not"
/B Uses empty format (no header information or summary).
/C Displays thousand separator in file sizes. This is the default. Use /-C to
disable separator display.
/D Same as wide, but files are listed in columns.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/O Lists files in sorted order.
sortorder N by name (alphabetic) S by size (smallest first)
E by extension (alphabetic) D by date/time (oldest first)
G directories first - prefix to reverse order
/P Pauses after each screenful of information.
Floor 5 Posted 2009-12-23 08:56 ·  中国 江苏 盐城 亭湖区 电信
新手上路
Credits 10
Posts 6
Joined 2009-12-02 19:31
16-year member
UID 155816
Gender Male
Status Offline
Top the 2nd and 3rd floors.
Forum Jump: