Quick .BAT Question:)
Apr 29, 2002 | 09:19 AM
Thread Starter
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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?
Apr 29, 2002 | 09:23 AM
Joined: Jul 2000
Posts: 2,145
Likes: 0
From: Islington
you can
echo addition line >>c:\autoexec.bat
>> being the append operand
Apr 29, 2002 | 09:33 AM
Thread Starter
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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]
Apr 29, 2002 | 01:03 PM
Joined: Dec 2000
Posts: 20,896
Likes: 53
From: Overdosed on LCD
That should put it on it's own line.
Apr 29, 2002 | 02:13 PM
Thread Starter
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
Apr 29, 2002 | 02:22 PM
Thread Starter
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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"
Apr 29, 2002 | 06:05 PM
Joined: Feb 2002
Posts: 459
Likes: 0
From: Newcastle
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.
Apr 29, 2002 | 08:27 PM
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?
Try the first command you suggested with /b on the end...
David
Apr 30, 2002 | 11:08 AM
Joined: Mar 2001
Posts: 17,497
Likes: 0
From: Just passing through...
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
Apr 30, 2002 | 11:54 AM
Thread Starter
Joined: May 2001
Posts: 6,329
Likes: 1
From: Europe
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