PDA

View Full Version : Adding command lines to Autoexec.bat



17-04-2001, 04:40 PM
Never used autoexec.bat before so Simple answers please.
I would like to add the following to autoexex for deleting files at startup:
del c:\windows\history\history.ie5\index.dat
and the same for temp files and cookies.
Do these commands also have to be added to other system file which works with autoexec.bat (can't remember the name)Hope you can help.

17-04-2001, 09:39 PM
Create your own batch file. Open Notepad write the lines you need and when you save save it as 'DelIndex.bat' or something to that effect include the Quotes or it will save it as a DelIndex.bat.txt / or save as DelIndex.Bat and the File Type as All Files, will do the same...

If you create a directory called batch and store your batch files there, then just reference the batch file you want to run in your autoexec.bat file, less changes required in the autoexec file.


Had a similar request from a friend regarding the FAT.DB file that used to take up a huge amount of space in Netscape and would become corrupt at times throwing out all sorts of spurious errors.

I am no expert at this so for all you officianados out there that may stumble across this and laugh, it worked for me...heh! heh!

REM ------COPY FROM HERE-----


@ ECHO OFF

REM This deletes all the files in the Netscape
REM cache. Sometimes html files suffer corruption
REM and it is also good housekeeping to delete
REM these files. A check is made to see if the
REM FAT.DB files exists, if not then the files
REM have already been deleted so exit proc.

:Begin
IF EXIST C:\PROGRA~1\NETSCAPE\USERS\CHASEM~1\CACHE\FAT.DB DEL C:\PROGRA~1\NETSCAPE\USERS\CHASEM~1\CACHE\?*.*
:end
EXIT

REM -----TO HERE-----

Obviously you'll need to substitute your own path for this...

Hope this helps...

17-04-2001, 09:41 PM
Create your own batch file. Open Notepad write the lines you need and when you save save it as 'DelIndex.bat' or something to that effect include the Quotes or it will save it as a DelIndex.bat.txt / or save as DelIndex.Bat and the File Type as All Files, will do the same...

If you create a directory called batch and store your batch files there, then just reference the batch file you want to run in your autoexec.bat file, less changes required in the autoexec file.


Had a similar request from a friend regarding the FAT.DB file that used to take up a huge amount of space in Netscape and would become corrupt at times throwing out all sorts of spurious errors.

I am no expert at this so for all you officianados out there that may stumble across this and laugh, it worked for me...heh! heh!

REM ------COPY FROM HERE-----


@ ECHO OFF

REM This deletes all the files in the Netscape
REM cache. Sometimes html files suffer corruption
REM and it is also good housekeeping to delete
REM these files. A check is made to see if the
REM FAT.DB files exists, if not then the files
REM have already been deleted so exit proc.

:Begin
IF EXIST C:\PROGRA~1\NETSCAPE\USERS\CHASEM~1\CACHE\FAT.DB DEL C:\PROGRA~1\NETSCAPE\USERS\CHASEM~1\CACHE\?*.*
:end
EXIT

REM -----TO HERE-----

Obviously you'll need to substitute your own path for this...

then all you'll need to do is add the following line to your autoexec.bat file

C:\BATCH\DELINDEX.BAT

That is of course if you decide to save it in C:\batch\

Hope this helps...

17-04-2001, 10:14 PM
Hmmm! REM commands need to be at the front of each line... these didn't wrap that well...
serves me right for straight copy / paste...

REM Something
REM something else

Ok?

20-04-2001, 07:12 AM
Gosh if you browser has not got these features built in I'd be switching to Internet explorer 5.5. Phobee