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