Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Bat - write to txt
Name: Code One Date: January 14, 2004 at 14:35:02 Pacific OS: me CPU/Ram: pent3-256mb
Comment:
hello, how do i set up a bat file to take a block of text (pre-written in the bat file), save it as a .txt file and place it in a folder i premade?
for example:
I would like to take some text like so: ::--------------- :: :test cls echo hello echo my name is... echo ummm.... echo oh yeah.. echo code one pause goto blah :: ::----------
Then have that text which is my bat file, copyied to a txt file, or atleast saved as a txt file.
And that file would be saved in a folder, uh lets call it... C:\MYDOCU~1\CodeOne
Name: Code One Date: January 14, 2004 at 15:19:46 Pacific
Reply:
nevermind figured it out...
thanks
code one
0
Response Number 2
Name: malu05 Date: January 15, 2004 at 15:52:45 Pacific
Reply:
For Others that like to know
Echo Hej MEd Dig > Mads.txt
or makeing a timer so you can se when the program was runned
Echo %Date% %Timer% > Mads.txt
0
Response Number 3
Name: Code One Date: January 16, 2004 at 19:39:03 Pacific
Reply:
for my own quick reference this is what I do:
set str1= echo %str1% hello >C:\windows\desktopmyText.txt
----- the text file has to be existant, anything pre-written in the file is overwritten, to have a line break you would code it like this: set str1= echo %str1%Hello > C:\windows\desktop\myText.txt set str2= echo %str2%good bye >>C:\windows\desktop\myText.txt
sweet!
(maybe wrong syntax, will post the correct if wrong)
Summary: I want a bat file to serach a txt file for paticular word say "xyz" and replace that word with "abc" and save it again eg I have bat file +++ test user name computer name thanks test +++ the "test" i...
Summary: I need to write a bat file to check to see if a file is present with the current date. the file name will always be the same, except it will be followed by _042809 (where 042909 will always reflect th...
Summary: im trying to figure out how to write to a file.. eg. i enter details into my form press save and it saves all the details to "C:\test.txt" but everytime i try it creates a new test.txt file and delete...