I've already made some topics about this but here is the final answer! (I think)
Everyone can understand these two codes, they are really easy to understand.
Write text:
Code: Select all
echo This is the first Line!>%filehere%
echo This is the second Line!>>%filehere%
echo And this is the third and final Line!>>%filehere%
(%filehere% is where you put the path of the file)
Loading text:
Code: Select all
< %filehere% (
set /p line1=
set /p line2=
set /p line3=
)
(%filehere% is where you put the path of the file)
(You can add as much line has you want, This one only has three)
(I got this code from this topic)
Now Here is a full code:
Code: Select all
@echo off
echo This batch will make a file called test.file
echo In it will be written 3 line of text, like this:
echo ----------------
echo Hello!
echo How are you?
echo Bye..
echo ----------------
pause
echo Hello!>test.file
echo How are you?>>test.file
echo Bye..>>test.file
cls
echo The test.file has been created!
echo You can now open it with a notepad to read what is inside.
echo Next this batch will read the test.file
echo and it will "echo" it.
pause
< test.file (
set /p line1=
set /p line2=
set /p line3=
)
cls
echo This is what is inside the test.file :
echo.
echo ----------------
echo %line1%
echo %line2%
echo %line3%
echo ----------------
pause
echo That is all!
echo See! Easy, isn't it?
pause
So yeah, that is it!
If you want to add anything Just say the word!