我想在DOS中编写一个批处理文件,该文件从输入目录中读取所有文件,并使用FOR循环在屏幕上显示文件列表。
dir
for the files in the directory
dir /s
if you want to include the files in the sub-directories.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.