1.

Solve : auto increment for filename and file content?

Answer»

how to append a new line into texts?
i got full of codes at file1.txt
test ABCDEFG a1
nmjkloi
ddkkkoll

and i want to auto generate 1000 FILES, the file name INCREASE by +1 and the number after a (a1) also increase by +1
so i have
file2.txt (a2)
file3.txt (a3)
....file1000.txt (a1000)


C:\test>type  only.bat

 echo off

rem echo nmjkloi  >> file1.txt



for /L %%i in (1,1,1000) do (
echo %%i
set ck=%%i
echo  hello >> file%%ia%%i.txt

rem if %ck%==10  goto :end

)
:end
type file*.txt
rem echo nmjkloi  >> file1.txt


rem [email protected]
C:\test>Cool new name, Bill.



Discussion

No Comment Found