file_exist.bat文件内容如下:
注:for /l %%i in (0, 1, 99) do语句中,/l指loop,表示循环,为带有步长的区间使用;
格式:for /l %variable in (start, step, end) do command [command-parameters]
start指起始值,step指步长,end指终止值;本例中,起始值为0,步长为1,终止值为99。

@echo off
echo 正在创建test0.txt~test99.txt共一百个文本文件......
for /l %%i in (0, 1, 99) do (
echo 我是test%%i.txt文件 >> test%%i.txt
)
echo 文件创建完毕

批处理基础(五)批量创建文件在这里插入图片描述
批处理基础(五)批量创建文件

相关文章:

  • 2022-01-10
  • 2021-05-31
  • 2022-02-11
  • 2021-11-27
  • 2021-06-08
  • 2021-12-13
  • 2021-12-20
猜你喜欢
  • 2021-05-03
  • 2021-05-30
  • 2021-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-12-08
相关资源
相似解决方案