Hey
I want to create a batch file that will create a file named : "settings.dat" and in this file it will contain :
[GEN]
Firstuse=True
How can I do this?
Thanks:)
Printable View
Hey
I want to create a batch file that will create a file named : "settings.dat" and in this file it will contain :
[GEN]
Firstuse=True
How can I do this?
Thanks:)
You can do it with 2.
The first, name it 1.bat has this line
2.bat > settings.dat
and in 2.bat put in this
@echo [GEN]
@echo Firstuse=True
when you run 1.bat it executes 2.bat and places 2.bats output to settings.dat
Thanks that works..But is there a way to do this with one batch file?
Place the following in a batch file:
rem @echo off
> Settings.dat echo [GEN]
>> Settings.dat echo Firstuse=True
rem pause
The first rem, will turn the response on and off to hide the response, take the rem away.
The second will simply pause it, take away the rem to pause the code.
This will replace the file Settings.dat with whatever you place after the echo part, to keep adding stuff to the file, add the line >> Settings.dat echo to the file and what you want to appear in the text document after the echo like above.
Simply create a new batch file on your desktop and place that in it and run it, so you can see how it works, any more qs, just ask.
ahh, I was trying to think of a 1 file way to do it. Glad someone knew. :D