|
yaoguof
初级用户
 
积分 90
发帖 35
注册 2006-10-23
状态 离线
|
『楼 主』:
请教,如何用命令列出文件夹下的文件夹的名字!
使用 LLM 解释/回答一下
用D盘有一个1的文件夹,1文件夹里面有2,3,4这么3个文件夹
用什么命令可以每行列出一个文件夹的名字,
目的是为了对2个文件夹进行对比,谢谢
There is a folder named 1 on drive D. Inside the 1 folder, there are 3 folders: 2, 3, and 4. What command can be used to list the name of each folder per line, with the purpose of comparing 2 folders? Thanks
|
|
2006-11-30 06:05 |
|
|
a9319751
中级用户
  
积分 439
发帖 170
注册 2006-1-9
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
C:\>dir /?
显示目录中的文件和子目录列表。
DIR at
sortorder]]
指定要列出的驱动器、目录
/A 显示具有指定属性的文件。
attributes D 目录
H 隐藏文件
S 系统文件
/B 使用空格式(没有标题信息或
/C 在文件大小中显示千位数分
停用分隔符显示。
/D 跟宽式相同,但文件是按栏
/L 用小写。
/N 新的长列表格式,其中文件
/O 用分类顺序列出文件。
sortorder N 按名称(字母顺序)
E 按扩展名(字母顺序)
G 组目录优先 - 颠倒
/P 在每个信息屏幕后暂停。
/Q 显示文件所有者。
/S 显示指定目录和所有子目录
/T 控制显示或用来分类的时间
timefield C 创建时间
A 上次访问时间
W 上次写入的时间
/W 用宽列表格式。
/X 显示为非 8dot3 文件名产生
短名称插在长名称前面。如
显示空白。
/4 用四位数字显示年
可以在 DIRCMD 环境变量中预先设定命令选
来替代预先设定的命令选项,例如,/-W。
C:\>dir /?
Displays a list of files and subdirectories in a directory.
DIR at
sortorder]]
Specifies the drive, directory
/A Displays files with specified attributes.
attributes D Directory
H Hidden file
S System file
/B Uses bare format (no header information or
/C Shows thousand separator in file sizes.
Disables separator display.
/D Same as wide but files are listed by columns
/L Uses lowercase.
/N New long list format where files
/O Lists files in sorted order.
sortorder N By name (alphabetically)
E By extension (alphabetically)
G Group directories first - Reverse
/P Pauses after each screenful of information.
/Q Displays file owner.
/S Displays specified directory and all subdirectories
/T Controls which time to display or use for sorting
timefield C Creation time
A Last access time
W Last write time
/W Uses wide list format.
/X Displays the short name generated for non 8dot3 filenames
The short name is inserted before the long name. If
displays blank.
/4 Uses four-digit year
You can predefine command options in the DIRCMD environment variable
to override the pre-set command options, for example, /-W.
|
|
2006-11-30 06:13 |
|
|
a9319751
中级用户
  
积分 439
发帖 170
注册 2006-1-9
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
C:\>dir /ad /b
WINNT
Documents and Settings
Program Files
Downloads
Inetpub
Recycled
C:\>dir /ad /b
WINNT
Documents and Settings
Program Files
Downloads
Inetpub
Recycled
|
|
2006-11-30 06:15 |
|
|
yaoguof
初级用户
 
积分 90
发帖 35
注册 2006-10-23
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
明白了,谢谢楼上的2位
Got it, thank you to the two above
|
|
2006-11-30 06:45 |
|
|
yaoguof
初级用户
 
积分 90
发帖 35
注册 2006-10-23
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
发现自己还是很菜,还有一个问题
一个文本里面有很多行,怎么每次读取一行文字,从第一行一直读取到最后一行!
I find that I'm still quite inexperienced. There's another question. There are many lines in a text. How to read one line of text each time, from the first line all the way to the last line!
|
|
2006-11-30 07:00 |
|
|
a9319751
中级用户
  
积分 439
发帖 170
注册 2006-1-9
状态 离线
|
|
2006-11-30 07:05 |
|
|
a9319751
中级用户
  
积分 439
发帖 170
注册 2006-1-9
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
for %%i in (1.txt) do....
对于 (1.txt) 中的每个 %%i 做....
|
|
2006-11-30 07:07 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
兄弟姐妹们,请你们在发问前先试着搜索一下,也许不用问也能找到答案;
兄弟姐妹们,请你们在回答问题时尽量清楚明白一点,我们菜鸟希望得到真诚的帮助。
谢谢合作。
Brothers and sisters, please try to search before asking questions. Maybe you can find the answer without asking;
Brothers and sisters, please try to be clear when answering questions. We rookies hope to get sincere help.
Thank you for your cooperation.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2006-11-30 07:09 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
兄弟,你不用每个帖子都来续一个,大家都看得到的。
Bro, you don't need to follow up on every post. Everyone can see it.
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2006-12-25 04:16 |
|