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 Apr 29, 2002 | 09:19 AM
  #1  
ChristianR's Avatar
ChristianR
Thread Starter
Scooby Regular
iTrader: (1)
 
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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?
Reply
Old Apr 29, 2002 | 09:23 AM
  #2  
Fosters's Avatar
Fosters
Scooby Regular
 
Joined: Jul 2000
Posts: 2,145
Likes: 0
From: Islington
Post

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

>> being the append operand
Reply
Old Apr 29, 2002 | 09:33 AM
  #3  
ChristianR's Avatar
ChristianR
Thread Starter
Scooby Regular
iTrader: (1)
 
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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]
Reply
Old Apr 29, 2002 | 01:03 PM
  #4  
JackClark's Avatar
JackClark
Scooby Senior
25 Year Member
Liked
Loved
Community Favorite
 
Joined: Dec 2000
Posts: 20,896
Likes: 53
From: Overdosed on LCD
Post

That should put it on it's own line.
Reply
Old Apr 29, 2002 | 02:13 PM
  #5  
ChristianR's Avatar
ChristianR
Thread Starter
Scooby Regular
iTrader: (1)
 
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
Post

it doesn't.
Reply
Old Apr 29, 2002 | 02:22 PM
  #6  
ChristianR's Avatar
ChristianR
Thread Starter
Scooby Regular
iTrader: (1)
 
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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"
Reply
Old Apr 29, 2002 | 06:05 PM
  #7  
ChrisS/P1's Avatar
ChrisS/P1
Scooby Regular
 
Joined: Feb 2002
Posts: 459
Likes: 0
From: Newcastle
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.
Reply
Old Apr 29, 2002 | 08:27 PM
  #8  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

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

David
Reply
Old Apr 30, 2002 | 11:08 AM
  #9  
mark_h's Avatar
mark_h
Scooby Regular
 
Joined: Mar 2001
Posts: 17,497
Likes: 0
From: Just passing through...
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
Reply
Old Apr 30, 2002 | 11:54 AM
  #10  
ChristianR's Avatar
ChristianR
Thread Starter
Scooby Regular
iTrader: (1)
 
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
Post

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




All times are GMT +1. The time now is 10:04 PM.