我想将数字 1 写入 2.txt 文件 2写入3.txt 类推 如何实现
使用FOR /L %a IN (1,1,9) DO echo %a>>%a.txt 只能实现将数字1写入1.txt
请高手指点
p: 应为是用于批处理可以多行实现
使用FOR /L %a IN (1,1,9) DO echo %a>>%a.txt 只能实现将数字1写入1.txt
请高手指点
p: 应为是用于批处理可以多行实现
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off
if == call %0 1 2 3 4 5 6 7 8 9:loop
if == goto end
echo %1>%2.txt
shift
goto loop:end
@echo off
if == call %0 1 2 3 4 5 6 7 8 9:loop
if == goto end
echo %1>%2.txt
shift
goto loop:end
@echo off
if == call %0 1 2 3 4 5 6 7 8 9
:loop
if == goto end
echo %1>>2.txt
shift
goto loop
:end
批处理:探索你的世界到底有多精彩!
>这好像是html语言中的表现形式(相当于重定向符>),好像不适用于批处理文件中吧!!!