1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

NS 7.0 - "clear cache" .bat

Discussion in 'Firefox, Thunderbird & SeaMonkey' started by captjlddavis, 2002/11/26.

Thread Status:
Not open for further replies.
  1. 2002/11/26
    captjlddavis

    captjlddavis Well-Known Member Thread Starter

    Joined:
    2002/09/13
    Messages:
    588
    Likes Received:
    3
    Hello to all,

    I have seen here (forum) that you can create a batch file to clear "cache" on boot. - several mentions by Ramona & Tranquilo in replies. Could someone please give me the syntax of this .bat file?

    Thanks in advance:
     
  2. 2002/11/26
    Ramona

    Ramona Geek Member Alumni

    Joined:
    2001/12/31
    Messages:
    7,481
    Likes Received:
    2
    To clear Cache and History on boot:

    Windows95/98:
    Open Autoexec.bat with notepad

    Add the following inside the Autoexec.bat file, just before the last line. Do NOT put it in the beginning of the autoexec.bat and not at the end of it, leave that last line in autoexec.bat as the last line of the autoexec.bat file.

    CALL NSMOZ.BAT

    Save the File.
    ----

    Open Notepad and create the following file:

    Windows 95/98:
    Netscape Communicator 4.x

    deltree /y c:\progra~1\netscape\users\username\cache
    deltree /y c:\progra~1\netscape\users\username\netscape.hst

    Netscape 7 or Mozilla

    deltree /y c:\windows\applic~1\mozilla\profiles\username\
    xxxxxxxx.slt\cache
    deltree /y c:\windows\applic~1\mozilla\profiles\username\
    xxxxxxxx.slt\history.dat


    Windows 2000/XP

    echo y | rd/s c:\progra~1\netscape\users\username\cache
    echo y | del c:\progra~1\netscape\users\username\netscape.hst

    echo y | rd/s c:\documents and settings\applic~1\mozilla\profiles\username\
    xxxxxxxx.slt\cache
    echo y | del c:\documents and settings\applic~1\mozilla\profiles\username\
    xxxxxxxx.slt\history.dat

    Name the file NSMOZ.BAT, (or whatever you wish to name the file)
    and save in your root directory: C:\NSMOZ.BAT

    [This guideline courtesy of tranquilo. :)]
    ---

    Please post back with any questions.

    Ramona :D
     
    Last edited: 2002/11/26

  3. to hide this advert.

  4. 2002/11/26
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Hi Ramona!

    You will have to change the 2000/XP version since deltree isn't usable there.

    If you will substitute, echo y | rd/s for deltree /y when it's addressing a directory and echo y | del when it's addressing a file, it should work.

    Best regards.
     
    Last edited: 2002/11/26
  5. 2002/11/26
    captjlddavis

    captjlddavis Well-Known Member Thread Starter

    Joined:
    2002/09/13
    Messages:
    588
    Likes Received:
    3
    Thanks to Tranquilo (via-Ramona):

    I assume that the "cache" folder/directory will be rebuilt when closing NS ?

    1. Can you run NSMOZ.BAT from within Windows 98SE ? (say from the Start - Run Button)

    Thanks again:
     
  6. 2002/11/26
    Ramona

    Ramona Geek Member Alumni

    Joined:
    2001/12/31
    Messages:
    7,481
    Likes Received:
    2
    Hi Zephyr,

    So that would be instead:

    echo /y c:\documents and settings\applic~1\mozilla\profiles\username\*.slt\cache

    and thanks!

    Ramona :D
     
  7. 2002/11/26
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Not quite yet;


    For removing a folder:
    echo y | rd/s c:\docume~1\applic~1\mozilla\profiles\username\*.slt\cache

    (where * is your .slt folder name prefix)

    and for a single file:
    echo y | del c:\progra~1\netscape\users\username\netscape.hst

    (assuming netscape.hst is a single file)

    Additionally, with an NT based system such as those, you will have to run this batch file in Windows. It will not work in the autoexec.bat nor the autoexec.ntt files. It's still useful that way though. You can place it in the Start-up folder if you want to automate it.

    Cheers.
     
    Last edited: 2002/11/26
  8. 2002/11/26
    Ramona

    Ramona Geek Member Alumni

    Joined:
    2001/12/31
    Messages:
    7,481
    Likes Received:
    2
    captjlddavis,

    When Netscape is opened the Cache folder will be rebuilt.
    Yes, you can use the Run feature, or use "Find" and double click on the file. This is assuming the file is located in your root directory.

    You don't have to use the Call NSMOZ.BAT in the autoexec.bat file. You can do it manually as described above.

    But... keep in mind that Netscape must be closed when you run the NSMOZ.BAT file.

    Ramona :D

    P.S. you can even make a shortcut on your Desktop for the NSMOZ.BAT file, for the sake of convenience.
     
    Last edited: 2002/11/26
  9. 2002/11/26
    captjlddavis

    captjlddavis Well-Known Member Thread Starter

    Joined:
    2002/09/13
    Messages:
    588
    Likes Received:
    3
    :D

    Thanks
     
  10. 2002/11/26
    captjlddavis

    captjlddavis Well-Known Member Thread Starter

    Joined:
    2002/09/13
    Messages:
    588
    Likes Received:
    3
    Ramona and all

    apparently the "*.slt" does not do as it should.
    It seems to work if you enter the actual XXXXXX.slt directory.

    Or did in misunderstand your excelent instructions.....

    Regards::eek:
     
  11. 2002/11/26
    Ramona

    Ramona Geek Member Alumni

    Joined:
    2001/12/31
    Messages:
    7,481
    Likes Received:
    2
    Hi captjlddavis,

    deltree /y c:\windows\applic~1\mozilla\profiles\username\*.slt\cache
    deltree /y c:\windows\applic~1\mozilla\profiles\username\*.slt\history.dat

    The above lines are meant as examples. These are not meant to be the "real thing ". You would need to add your Profile name where the "username" is listed, and the full "salted file name where "*.slt" is listed.

    Sorry I didn't make that clear to you. :(

    Ramona :D
     
  12. 2002/11/26
    captjlddavis

    captjlddavis Well-Known Member Thread Starter

    Joined:
    2002/09/13
    Messages:
    588
    Likes Received:
    3
    Ramona,

    Sometime when I am in uncharted areas I tend to take things literaly ( and I can't spell well either) I got the username part but was unsure of the *.slt. It could have been a "wild card "...........

    Anyway thanks to both for your assistance.

    regards

    :eek:
     
  13. 2002/11/26
    Ramona

    Ramona Geek Member Alumni

    Joined:
    2001/12/31
    Messages:
    7,481
    Likes Received:
    2
    captjlddavis.

    Please don't be embarrassed, as it is so easy to misunderstand or misinterpret instructions. I will try to be more explicit next time around.

    Ramona :D
     
  14. 2002/11/27
    Alice

    Alice Banned

    Joined:
    2002/01/08
    Messages:
    938
    Likes Received:
    0
    My 2 cents :)

    Here are the contents of one of my delcache.bat files, for a Mozilla 1.0.1 profile, which I run MANUALLY in Windows 95 (I prefer not to automate any cleanup functions using autoexec.bat or Startup shortcuts).

    I placed the bat file inside my own C:\Alice\Dos folder and run it by double-clicking or by going to Start Run and browsing to it.

    Using myprofile\xxxxxxxx.slt instead of the actual folder names:

    cd C:\Windows\Mozilla\Profiles\myprofile\xxxxxxxx.slt
    deltree /Y cache\
    echo off
    cls

    The first line of my batch file switches you first to the SLT folder then the second line executes deltree /Y cache\ which deletes the entire cache folder and it's contents (which will be recreated when Netscape/Mozilla is reopened). I could have also used a single line as Ramona suggested.

    In Windows 95, my path is C:\Windows\Mozilla\Profiles\....... (not c:\windows\applic~1\mozilla\profiles) so people should double-check their actual path as it may vary.

    The echo off and cls lines are added so that the Dos window closes automatically after the batch file completes - See http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q122514&

    There was a previous thread on batch files here awhile back:
    http://www.windowsbbs.com/showthread.php?s=&threadid=9404
     
    Last edited: 2002/11/27
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.