adding line to autoexec.bat

adding line to autoexec.bat

Post by jumb » Sat, 02 Aug 1997 04:00:00



Hi,

I want to use a batch file in order to add a line in the autoexec.bat
If possible i also want to remove it later on

thanks for helping out

Jumble

http://www.telebyte.nl/~jumble

 
 
 

adding line to autoexec.bat

Post by Manuel Algo » Sun, 10 Aug 1997 04:00:00



>Hi,

>I want to use a batch file in order to add a line in the autoexec.bat
>If possible i also want to remove it later on

>thanks for helping out

>Jumble

>http://www.telebyte.nl/~jumble

This seems to work fine:

Create a file with the line(s) you want to add. Let's call it LINE.

Then, to add them to the autoexec.bat, do:

        copy autoexec.bat autoexec.bak
        copy autoexec.bat+line autoexec.bat

To "remove" the line (or rather, to restore your former autoexec.bat):

        del autoexec.bat
        ren autoexec.bak autoexec.bat

NOTICE: your autoexec.bat must end with a carriage return, so that the
LINE file is added as a separate line, instead of appended to the last
line of the autoexec.bat

Manuel Algora

Love is Joy