Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Quick .BAT Question:)

Thread Tools
 
Search this Thread
 
Old 29 April 2002, 09:19 AM
  #1  
ChristianR
Scooby Regular
Thread Starter
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

Want to make a patch file that adds a line to the autoexec.bat, what is the best way of doing it?

I was thinking of making a batch file with the following in it:

copy c:\autoexec.bat + x:\text.txt c:\autoexec.bat /y

suggestions/ideas?
Old 29 April 2002, 09:23 AM
  #2  
Fosters
Scooby Regular
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

you can
echo addition line >>c:\autoexec.bat

>> being the append operand
Old 29 April 2002, 09:33 AM
  #3  
ChristianR
Scooby Regular
Thread Starter
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

forgot about that way - however need to have an "return" before, so it puts it on its on line, and doesn't ammend to exising line.

[Edited by ChristianR - 4/29/2002 9:34:14 AM]
Old 29 April 2002, 01:03 PM
  #4  
JackClark
Scooby Senior
 
JackClark's Avatar
 
Join Date: Dec 2000
Location: Overdosed on LCD
Posts: 20,852
Received 51 Likes on 34 Posts
Post

That should put it on it's own line.
Old 29 April 2002, 02:13 PM
  #5  
ChristianR
Scooby Regular
Thread Starter
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

it doesn't.
Old 29 April 2002, 02:22 PM
  #6  
ChristianR
Scooby Regular
Thread Starter
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

only places at last point, so if you have a space after the last word it is added on "test TEST", if you dont have a space "testTEST" and if you have a return "test
TEST"
Old 29 April 2002, 06:05 PM
  #7  
ChrisS/P1
Scooby Regular
 
ChrisS/P1's Avatar
 
Join Date: Feb 2002
Location: Newcastle
Posts: 459
Likes: 0
Received 0 Likes on 0 Posts
Post

Have you thought of getting a freeware version of SED or AWK. They should do the trick. No idea what the commands are. It's been a long time.
Old 29 April 2002, 08:27 PM
  #8  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

Try the first command you suggested with /b on the end...

David
Old 30 April 2002, 11:08 AM
  #9  
mark_h
Scooby Regular
 
mark_h's Avatar
 
Join Date: Mar 2001
Location: Just passing through...
Posts: 17,497
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

The command "echo." (no space after the echo) will print a blank line, so try:

echo. >>c:\autoexec.bat
echo addition line >>c:\autoexec.bat
Old 30 April 2002, 11:54 AM
  #10  
ChristianR
Scooby Regular
Thread Starter
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

thanks u r a star
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
IanG1983
Wheels, Tyres & Brakes
2
06 October 2015 03:08 PM
Wouldie
ScoobyNet General
4
29 September 2015 05:12 PM
alcazar
Non Scooby Related
37
27 September 2015 10:35 PM
M4RKG
Wanted
4
25 September 2015 09:54 PM



Quick Reply: Quick .BAT Question:)



All times are GMT +1. The time now is 05:21 PM.