Dos batch file add text - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 07-17-2006, 10:44 AM   #1 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default Dos batch file add text

Does anyone know how to make a batch file add text to a file?
__________________

kpmwrestler is offline  
Old 07-17-2006, 10:54 AM   #2 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default

echo text to add here >> somefile.txt


its called output redirection.


>> appends text

> will over write the same file.
__________________

office politics is offline  
Old 07-17-2006, 11:27 AM   #3 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default

Thanks. It worked. Is there any way to specify exactly where in the file to put the text?
__________________
Torvalds was contemptuous of Microsoft's claims and has asked Redmond to name the patent infringements so that their veracity can be challenged and workarounds found.
"Naming them would either make it clear that Linux is not infringing at all (which is quite possible, especially if the patents are bad), or would make it possible to avoid infringing by coding around whatever silly thing they claim,"

"So the whole 'We have a list and we're not telling you' should tell you something. Don't you think that if Microsoft actually had some really foolproof patent, they'd just tell us and go, 'nyaah, nyaah, nyaah!'?"

whole story here: http://www.vnunet.com/vnunet/news/21...-microsoft-put
kpmwrestler is offline  
Old 07-17-2006, 11:32 AM   #4 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default

from dos you can only overwrite the whole file or append text to the end.

you could write a vbscript to edit text anywhere in text files.
office politics is offline  
Old 07-17-2006, 12:02 PM   #5 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default

what's a vbscript?
__________________
Torvalds was contemptuous of Microsoft's claims and has asked Redmond to name the patent infringements so that their veracity can be challenged and workarounds found.
"Naming them would either make it clear that Linux is not infringing at all (which is quite possible, especially if the patents are bad), or would make it possible to avoid infringing by coding around whatever silly thing they claim,"

"So the whole 'We have a list and we're not telling you' should tell you something. Don't you think that if Microsoft actually had some really foolproof patent, they'd just tell us and go, 'nyaah, nyaah, nyaah!'?"

whole story here: http://www.vnunet.com/vnunet/news/21...-microsoft-put
kpmwrestler is offline  
Old 07-17-2006, 12:15 PM   #6 (permalink)
It's all just 1s and 0s
 
office politics's Avatar
 
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics
Default

http://en.wikipedia.org/wiki/VBScript
Quote:
VBScript (short form of Visual Basic Script Edition) is an Active Scripting language interpreted via Microsoft's Windows Script Host. The language's syntax reflects its pedigree as a variation of Microsoft's Visual Basic programming language. It has gained significant support from Windows administrators seeking an automation tool more powerful than the batch language first developed in the late 1970s.
office politics is offline  
Old 07-17-2006, 12:21 PM   #7 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default

Oh, visual basic. Thanks for all your help.
__________________
Torvalds was contemptuous of Microsoft's claims and has asked Redmond to name the patent infringements so that their veracity can be challenged and workarounds found.
"Naming them would either make it clear that Linux is not infringing at all (which is quite possible, especially if the patents are bad), or would make it possible to avoid infringing by coding around whatever silly thing they claim,"

"So the whole 'We have a list and we're not telling you' should tell you something. Don't you think that if Microsoft actually had some really foolproof patent, they'd just tell us and go, 'nyaah, nyaah, nyaah!'?"

whole story here: http://www.vnunet.com/vnunet/news/21...-microsoft-put
kpmwrestler is offline  
Old 07-17-2006, 12:25 PM   #8 (permalink)
Super Techie
 
Join Date: Jun 2006
Posts: 489
Default

Could qbasic do it? Is qbasic easier or harder?
__________________
Torvalds was contemptuous of Microsoft's claims and has asked Redmond to name the patent infringements so that their veracity can be challenged and workarounds found.
"Naming them would either make it clear that Linux is not infringing at all (which is quite possible, especially if the patents are bad), or would make it possible to avoid infringing by coding around whatever silly thing they claim,"

"So the whole 'We have a list and we're not telling you' should tell you something. Don't you think that if Microsoft actually had some really foolproof patent, they'd just tell us and go, 'nyaah, nyaah, nyaah!'?"

whole story here: http://www.vnunet.com/vnunet/news/21...-microsoft-put
kpmwrestler is offline  
Old 07-17-2006, 01:54 PM   #9 (permalink)
Super Techie
 
Join Date: Dec 2004
Posts: 319
Send a message via AIM to evelmunkey
Default

qbasic is really bad....easy but I wouldnt waste my time.
__________________

__________________
evelmunkey is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 01:59 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.