[英]Print all the files inside a dir through batch file
我想在DOS中编写一个批处理文件,该文件从输入目录中读取所有文件,并使用FOR循环在屏幕上显示文件列表。
dir
for the files in the directory dir
中文件的目录
dir /s
if you want to include the files in the sub-directories. dir /s
如果要在子目录中包含文件)。
microsoft command line reference
edit: 编辑:
FOR %%i IN (*.*) DO echo %%i
This will print out the names of all the files in the directory you run the batch file in. 这将打印出您运行批处理文件的目录中所有文件的名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.