『第 2 楼』:
使用 LLM 解释/回答一下
Dir
显示目录文件和子目录列表。
dir attributes]]sortorder]] timefield]]
参数
无
如果在没有参数或开关的情况下使用,则 dir 显示磁盘的卷标和序列号,后接磁盘上目录和文件列表,包括它们的名称和最近修改的日期及时间。dir 可以显示文件的扩展名以及文件的字节大小。Dir 也显示列出的文件及目录的总数、累计大小和磁盘上保留的可用空间(以字节为单位)。
指定要查看其列表的驱动器和目录。
指定要查看其列表的特殊文件或文件组。可以使用多个文件名。文件名可以使用空格、逗号或分号分开。可以在 filename 参数中使用通配字符(? 和 *)显示一组文件。
/p
每次显示一个列表屏幕。要查看下一屏,请按键盘上的任意键。
/w
以宽格式显示列表,在每一行上最多显示 5 个文件名或目录名。
/d
与 /w 相同,但是文件按列排序。
/aattributes]
只显示那些指定属性的目录和文件名称。如果省略此开关,dir 将显示除隐藏文件和系统文件之外的所有文件名。如果在没有指定 attributes 的情况下使用此开关,dir 显示所有文件的名称,包括隐藏和系统文件。以下列表描述了每个可用于 attributes 的值。冒号 (:) 是可选的。使用这些值的组合,并且不得用空格分隔这些值。
值 说明
h 隐藏文件
s 系统文件
d 目录
a 可以存档的文件(备份)
r 只读文件
-h 非隐藏的文件
-s 系统文件以外的文件
-d 只是文件(而非目录)
-a 自上次备份后没有更改过的文件
-r 非只读的文件
/o sortorder]
控制 dir 排序和显示目录名和文件名的顺序。如果省略此开关,dir 将按它们在目录中出现的顺序显示名称。如果在没有指定 sortorder 的情况下使用该开关,dir 显示按字母顺序排列的目录名,然后显示按字母顺序排列的文件名。冒号 (:) 是可选的。以下列表描述了每个可用于 sortorder 的值。使用这些值的组合,并且不得用空格分隔这些值。
值 说明
n 按名称的字母顺序
e 按扩展名的字母顺序
d 按日期和时间,最早的优先。
s 按大小,最小的优先
g 在文件之前分组的目录
-n 按名称的逆序字母(从 Z 到 A)排序
-e 按扩展名的逆序字母(从 .ZZZ 到 .AAA)排序
-d 按日期和时间,最晚的优先
-s 按大小,最大的优先
-g 在文件之后分组的目录
t timefield]
以下列表描述了每个可用于 timefield 的值。控制显示或用于排序的时间字段。
值 说明
c 创建
a 上次访问
w 上次写入
/s 列出指定目录及所有子目录中出现的每个指定的文件名。
/b 列出每个目录名或文件名,每行一个(包含文件扩展名)。该开关不显示标题信息和摘要。/b 开关替代 /w 开关。
/l 按小写字母显示未排序的目录名和文件名。该开关不会将扩展字符转换为小写字符。
/n 在最右边显示带有文件名的长列表格式。
/x 显示 NTFS 和 FAT 卷上文件生成的短名称。显示与 /n 开关相同,但是短名称显示在长名称后。
/c 按文件大小显示多个分隔符。
详细信息,请单击“相关主题”列表中的 Tree。
Tree
图像化显示路径或驱动器中磁盘的目录结构。
tree
参数
drive:
指定包含要显示目录结构的磁盘的驱动器。
path
指定要显示目录结构的目录。
/f
显示每个目录中的文件名。
/a
指定 tree 使用文本字符而不是图形字符显示链接子目录的行。
Dir
Displays a list of directory files and subdirectories.
dir attributes]]sortorder]] timefield]]
Parameters
None
If used without parameters or switches, dir displays the volume label and serial number of the disk, followed by a list of directories and files on the disk, including their names and the most recent modification date and time. dir can display the file extension as well as the file size in bytes. Dir also displays the total number of files and directories listed, the cumulative size, and the available space remaining on the disk (in bytes).
Specifies the drive and directory to view the list of.
Specifies a specific file or group of files to view the list of. Multiple filenames can be used. Filenames can be separated by spaces, commas, or semicolons. Wildcard characters (? and *) can be used in the filename parameter to display a group of files.
/p
Displays one screen of the list at a time. Press any key on the keyboard to view the next screen.
/w
Displays the list in wide format, showing up to 5 filenames or directory names per line.
/d
Same as /w, but files are sorted in columns.
/aattributes]
Displays only the names of directories and files with the specified attributes. If this switch is omitted, dir displays all filenames except hidden and system files. If this switch is used without specifying attributes, dir displays the names of all files, including hidden and system files. The following list describes each value that can be used for attributes. The colon (:) is optional. Use combinations of these values and do not separate them with spaces.
Value Description
h Hidden files
s System files
d Directories
a Archiveable files (backups)
r Read-only files
-h Non-hidden files
-s Files other than system files
-d Only files (not directories)
-a Files that have not been changed since the last backup
-r Non-read-only files
/o sortorder]
Controls the order in which dir sorts and displays directory names and filenames. If this switch is omitted, dir displays names in the order they appear in the directory. If this switch is used without specifying sortorder, dir displays directory names in alphabetical order, followed by filenames in alphabetical order. The colon (:) is optional. The following list describes each value that can be used for sortorder. Use combinations of these values and do not separate them with spaces.
Value Description
n Alphabetical order by name
e Alphabetical order by extension
d By date and time, earliest first.
s By size, smallest first
g Directories grouped before files
-n Reverse alphabetical order by name (from Z to A)
-e Reverse alphabetical order by extension (from .ZZZ to .AAA)
-d By date and time, latest first
-s By size, largest first
-g Directories grouped after files
t timefield]
The following list describes each value that can be used for timefield. Controls the time field to display or use for sorting.
Value Description
c Creation
a Last access
w Last write
/s Lists each specified filename that appears in the specified directory and all subdirectories.
/b Lists each directory name or filename, one per line (including the file extension). This switch does not display header information or summary. /b overrides the /w switch.
/l Displays unsorted directory names and filenames in lowercase letters. This switch does not convert extended characters to lowercase.
/n Displays the long list format with filenames on the far right.
/x Displays the short names generated by files on NTFS and FAT volumes. Displays the same as the /n switch, but short names are displayed after long names.
/c Displays multiple separators by file size.
For more information, click Tree in the "Related Topics" list.
Tree
Graphically displays the directory structure of a path or drive's disk.
tree
Parameters
drive:
Specifies the drive containing the disk whose directory structure you want to display.
path
Specifies the directory whose directory structure you want to display.
/f
Displays the filenames in each directory.
/a
Specifies that tree uses text characters instead of graphic characters to display the lines that link subdirectories.
|