How do i make an automatic file writing system? -


i'm making automatic file writing system writes random numbers onto .txt file, need write .bat, problem i'm newbie batch!

this common problem, call autosave, code:

(   echo %yourvariable% ) > mylittlevariable.sav 

what do? when script reaches code, writes number %yourvariable% in .sav file, .sav can changed .txt or format.
want load variable now! code:

< mylittlevariable.sav (   set /p yourvariable= ) 

well want write random numbers! code random numbers:

(   echo %random%   echo %random% ) > random#s.txt 

so how works? batch file, before having command in autosave batch writer have put echo, how echo makes statement in cmd, types after in autosave, too. code basic .bat:

(   echo @echo off   echo title basic autosave batch   echo :loop   echo set supervar=15   echo cls   echo echo hello, world!   echo echo supervar: %%supervar%%   echo pause   echo goto loop ) > mybasicbatch.bat 

so, know know does, correct? hope helped you!
ps double amount of percent signs necessary, if had normal amount code wouldn't read properly!


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -