
[分享]BAT腳本批量創建文件問題:為何我這批處理不能批量新建文件嗯
方案1.batnclick="copycode($('code0'));">復制代碼
- @echo off
- Set i=0000
- :start
- @cd. >c:usersadministratordesktop%i%.txt
- if /a i<=0005(
- i=i+1
- got start
- )else exit
方案2.batnclick="copycode($('code1'));">復制代碼
- @echo off
- setlocal enabledelayedexpansion
- set n=10000
- for /l %%i in (%n%,1,10005) do (
- set x=%%i
- set x=!x:~-4!
- cd.>c:usersadministratordesktop!x!.txt
- )
nclick="copycode($('code2'));">復制代碼
- @echo off
- setlocal enabledelayedexpansion
- set i=10000
- :start
- cd.>c:usersadministratordesktop!i:~-4!.txt
- if !i! leq 10005 (
- set /a i=i+1
- goto :start
- )

