标题: 请写一个显示所有BAT、TXT文件内容的批处理
[打印本页]
作者: proof
时间: 2008-7-23 19:28
标题: 请写一个显示所有BAT、TXT文件内容的批处理
mode *.bat *.txt
满屏时,要求分屏等待。不知type 能否分屏等待?
作者: lxmxn
时间: 2008-7-23 19:35
type 不行,试试 more *.bat *.txt ,不过这个有点小bug,只要你的文件夹名中没有.bat或者.txt结尾的文件夹就行了。
作者: HAT
时间: 2008-7-23 19:52
@echo off
for /f "delims=/" %%a in ('dir /s /b *.bat *.txt') do (
more "%%a"
)
作者: proof
时间: 2008-7-23 21:56
Windows ME MS-DOS屏幕信息
F:\RAR>type cc.bat
@echo off
for /f "delims=/" %%a in ('dir /s /b *.bat *.txt') do (
more "%%a"
)
F:\RAR>cc
Syntax error
Invalid file name in command line
Bad command or file name
F:\RAR>dir *.bat
Volume in drive F is 本地磁盘
Volume Serial Number is 0D38-1BF9
Directory of F:\RAR
M BAT 53 09-18-05 0:00 M.bat
CC BAT 83 07-23-08 21:43 cc.bat
2 file(s) 136 bytes
作者: proof
时间: 2008-7-23 21:57
FOR %%C IN (*.BAT *.TXT) DO MORE < %%C (报错:File not found)
FOR %%C IN (*.BAT *.TXT) DO TYPE %%C | MORE (满屏不等待)
满屏时,要求分屏等待。不同的*.TXT之间最好有分隔。*******也行,C:\>也行,三个空行也行。
作者: HAT
时间: 2008-7-23 22:50
没有WinME环境,无法测试。
WinXP里面没有问题。
作者: proof
时间: 2008-7-24 00:43
Quote: |
Originally posted by HAT at 22:50:
没有WinME环境,无法测试。
WinXP里面没有问题。 |
|
还是感谢你热心帮助。