创建一个读取当前目录中包含的所有文本文件的批处理文件 [英] Create a batch file that reads all the text files contained in current directory
本文介绍了创建一个读取当前目录中包含的所有文本文件的批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ $ $ $ code $ @ $ $ $ $ $ $ $ $ $ $ $ tokens = * delims =%% x in(text1.txt)do echo %% x
PAUSE
解决方案
这比以前简单:
@ECHO OFF
FOR %% A IN(* .txt)DO ECHO %% A
PAUSE
$ b编辑
使用这个:
$ b@ECHO OFF
TYPE * .txt
PAUSE
The essence of the task in the description, so far I have a code reading the file. But the cycle can not be put into a loop in batch
@ECHO OFF
for /f "tokens=* delims=" %%x in (text1.txt) do echo %%x
PAUSE
解决方案
It's simpler than that:
@ECHO OFF
FOR %%A IN (*.txt) DO ECHO %%A
PAUSE
Edit
To satisfy your more clear requirement then just use this:
@ECHO OFF
TYPE *.txt
PAUSE
这篇关于创建一个读取当前目录中包含的所有文本文件的批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文