using batch files to create text files with text in each file -


i know title sounds crazy. anyway, here scenario:

i need create 500 text files 500 different files. each text file contain information seen in example below. there easy way put single batch file without copy , pasting 500+ times?

example of trying do....

echo ^<filename 1^> >> filename1.txt echo. >> filename1.txt echo. >> filename1.txt echo no ocr found >> filename1.txt 

using random numbers files...

@echo off set loop=0 :loop set num=%random% if exist filename%num%.txt (     echo ^<filename %num%^>     echo.     echo.     echo no ocr found ) > filename%num%.txt else (     goto loop ) set /a num+=1 if %loop%==500 goto end goto loop :end 

note:
maximum amount of files 32767.

to change amount of files made, change number in last if statement (e.g: make create 80 files change if %loop%==500 goto end if %loop%==80 goto end).


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -