Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Win98 Temp Dirs

  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Dallas, Texas, USA
    Posts
    1,680
    Thanks
    0
    Thanked 1 Time in 1 Post

    Win98 Temp Dirs

    I remember having a statement in the autoexec.bat file that would erase all files in the <font color=blue>C:temp</font color=blue> & <font color=blue>c:windowstemp</font color=blue> directories. It's not there anymore? I don't recall if the files were zapped when the computer booted or as it was being shut down. - I just know it kept things cleaned up preety good (behind the scenes). Some direction here would be much appreciated.

    Also, I'm looking at the <font color=blue>C:windowstemp</font color=blue> directory now and I see that it has 3 additional folders inside of it: Cookies, History & Temporary Internet Files. This seems unneccesary since those same three folders are present in the <font color=blue>C:Windows</font color=blue> directory!
    - Ricky

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    First off, as you have noted, something is incorrect about your system. You do not need to have two Cookies, History, and TIF folders. You should make sure that the active folders are the ones under C:Windows. You can do this by looking at the dates of the items in these folders, or for the TIF (temporary internet files folder) you can check Tools | Internet Options... | General tab | Temporary Internet files | Settings... | Temporary Internet files folder | Current location:

    I would then delete the folders in C:WindowsTemp.

    Next you need to verify which "Temp" folder is your active Temp folder. Open a DOS (Command) box and type "set" (no quotes), and hit Enter. Look for these two lines:

    TMP=C:windowsTEMP
    TEMP=C:windowsTEMP

    They will point to your correct Temp folder. The other one is ersartz.

    Next, I highly recommend AGAINST using the autoexec.bat file to clean out your active Temp folder. This is because many programs -- including many Microsoft updates -- use the Temp folder to hold important information. This information is accessed during the installation of new programs so that the installation can complete.

    This is because some files can ONLY be modified or exchanged in DOS. The program will say, "You need to reboot your computer to finish installation". When you reboot, the installation program accesses the Temp folder in DOS and completes the installation.

    HOWEVER, if autoexec.bat has emptied your Temp folder, the installation process can never complete.

    Go it so far?

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    Hi
    If you want a safe, automated way of cleaning out your TEMP directory, pop over to my website, click the Index button and download Autoclean Temp Files (.doc or .pdf - for the latter you'll need Adobe Acrobat Reader)
    If you clean at the start of a session, anything in the directory with the .tmp extension is redundant.

    Click My Sig

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    As long as it does NOT delete the contents of the Temp folder too soon, then it is OK. If it deletes the Temp folder in the autoexec.bat file, then I would avoid it like the plague.

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    Hi Rick and Tricky

    * .tmp files that are still there in the next session (i.e. after a re-boot) are litter. Anything needing to use them has already done so. Most well-behaved apps remove their own. This is why I suggest cleaning out that particular folder at the start of the day - assuming you switch on and off.


    If the deleting of such files causes you worry :

    i. I have been doing it for years with no adverse effects
    ii. Forget automation and Delete them to the Recycle Bin, keep 'em there for however long makes you feel safe, then permanently expunge them.

    I'm sorry I don't know what the reference to the autoexec.bat file means. No automatic process should ever be set to interfere with this. If you mean 'don't empty the TEMP folder that autoexec.bat sets up with this sort of line :

    SET TEMP=C:WIN001TEMP
    SET ~MP=C:WIN001TEMP
    SET TMP=C:WIN001TEMP'

    then I can't imagine what TEMP folder could be referred to. I agree that in the autoexec .bat file there should not be placed any statement that Deletes things on start-up. There is absolutely nothing wrong with setting up a .bat file to clear out the TEMP folder when the user initiates the action from within Windows. In NT based systems, autoexec.bat would not be involved .

    I need not emphasise that this is about emptying the folder, and not Deleting the folder itself - not sure Windows would let you anyway. I would certainly be worried if I found my Temporary Internet Files and Cookies folders in the TEMP file. That's not where they're supposed to be, and IE has been set up wrongly. Those two folders should only ever be emptied from within IE itself.

    Rgds

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    The probem is clearly that many apps are not well-behaved! ;-]
    _____

    Not true -- some TEMP files there after a reboot are *not* litter. Otherwise there would be no reason to "reboot" to complete the installation. The problem with the TEMP folder is that MANY programs don't behave well and 'forget' to clean out the litter they leave behind. That is why the size of the TEMP folder keeps on growing inappropriately. That is why it is important to clean it out in the first place!

    The reference to the autoexec.bat files comes from the first post in this thread.

    I delete NUMEROUS things from within my autoexec.bat file -- and I have been doing it for years with no adverse effects . (I have also smoked many cigars with no adverse effects, but that does not make them safe.) ;-]

    If you delete the TEMP folder, I would suspect Windows would recreate it.

    Microsoft uses the Win98 TEMP folder for completing installation of programs that need to replace or modify files that are "in use" by WIndows. If you use the autoexec.bat file to clean out your TEMP folder, some installations cannot be completed appropriately.

    That is the bottom line. Don't use the autoexec.bat file to clean out your TEMP folder. DON'T do it! There are better ways...
    __________________________________________________ __________-

    Perhaps there is a language barrier... ;-]

    I am sure you understand the concept. When Windows is running it is using certain files. Those files cannot be deleted or modified or anything -- they are "in use" and are considered to be "locked". Well, how in the world can you upgrade something that is locked and in use??

    Very simple. The installation (or upgrading) program finishes MOST of the installation process. Then for the certain files that it cannot modify -- the locked files -- it places them in a temporarily location. Let's be wild and crazy and call this location the "TEMP" folder. Windows always knows where this is because the TEMP folder is an environmental variable defined as %temp%. Windows places the files that it cannot modify into the %temp% folder and then asks you to reboot. During the reboot process, your Win9x computer begins in a DOS mode before Windows has fully started and before the files are locked. The installation program has left behind commands the be "Run" during the reboot process that will modify or replace those files that it could not access while Windows was running. After the installation has used these TEMP files, they should be deleted -- but they frequently are not. Many programs leave lots of junk in the TEMP folder -- that is just the way it is.

    So, you can likely see where deleting the contents of the TEMP folder early in the boot processit is NOT the most desirable thing in the world to do. Since the autoexec.bat file runs VERY early in the boot process, if this batch file is used to delete the content of the TEMP folder, some installation processes will not complete correctly. As above, I highly recommend against using the autoexec.bat file for this purpose -- which is what the original question asks -- I believe.

    Well, the question that COULD have followed (but did not) was "WHEN and HOW can you delete the TEMP folder"? The answer is "near the END of the boot process" -- after any installation program would have already used its contents.

    One of the simplest ways to do this is to create a .pif shortcut in your Startup folder. To do this, open the Startup folder. For Win98, this is usually at:
    C:WINDOWSStart MenuStartUp

    1. Right-click in this folder and select a New | Shortcut. In the command line paste this:
    C:WINDOWSCOMMANDDELTREE.EXE /y c:windowstemp

    2. Hit the Next button. Give this a Name you will not forget -- I use "Delete Temporary Files".

    3. Choose an icon you like -- most of us use the Dynamite one! ;-]

    4. Hit Finish -- and you are NOT quite finished.

    5. Go back to the Shortcut you have just created and right-click on it. Select Properties.

    6. Go to the Program tab and place a check in the "Close on exit" box.

    7. Hit the Apply and OK buttons -- and now you are finished.

    When you reboot your computer, your TEMP folder will be properly emptied LATE in the boot process. ;-]

  7. #7
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    <hr>And don't take this too seriously...<hr>
    Amen.
    -Mark

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    MerC, buddy, calm down!! Don't take my annoying sarcasm so personally!! ;-]

    These are the facts:

    1. I ALWAYS use the autoexec.bat file to delete NUMEROUS things. REALLY, I do and I think it is a great method to do this. You can delete MANY things that Windows will not allow you to delete once it has started.

    2. I ALWAYS use the autoexec.bat file to delete folders. Windows will automatically recreate them on starting -- if it needs them. It ALWAYS has and ALWAYS will. I have done it for YEARS.

    3. Please read the first statement in this thread: "I remember having a statement in the autoexec.bat file that would erase all files in the C:temp & c:windowstemp directories." THIS is the statement that I am trying to debunk.

    4. You are talking about *.tmp files -- they are NOT the same as the TEMP folder (I recognize you know this).

    5. Tricky was asking about deleting the TEMP folder -- I recognize it was not you! Windows WILL let you delete it -- I delete it every day!

    6. I disagree with your technique -- I think mine is better because it COMPLETELY empties the TEMP folder -- NOT just the *.tmp or *.~mp files.

    7. I have tried to answer your statements posted HERE in this forum. If you feel your .doc of .pdf files contain light, please turn their light this direction. Why should I have to go to download something? Do you think I would trust your site after the behavior and language you displayed here?? ;-]

    Besides, why should you be offering .doc files for download? They are potentially dangerous. I would convert them all to .pdf files -- I have even given you the link for a free converter! :-]

    Have a good one. And don't take this too seriously... ;-]

  9. #9
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    The logic seems to have escaped you are well. ;-]

    I have looked at your attached PDF file, and as I stated above it is somewhat limited in its scope -- plus it contains several coding errors.

    1) In it's basic form, it ONLY deletes *.tmp and *.~mp files in the TEMP directory. Even if you modify it to *.*, you are still leaving unnecessary sub-folders and their contents in the TEMP directory. Why? What is the point of leaving behind unneeded sub-folders and files?

    2) I am not clear as to what "~*.*" signifies. Does the wildcard (*) NOT include the tilde? This is news to me. I have never seen anyone use a tilde before a wildcard. Very interesting.

    3) Can you explain to us what the "/q" switch is doing there for the "del" command in DOS (Win9x)? I must assume that you believe the "q" is for "quiet", but I don't believe that is necessary for the "del" command in DOS.

    Here is the correct syntax for the DEL command in DOS:

    DEL [drive:][path]filename [/P]
    ERASE [drive:][path]filename [/P]
    [drive:][path]filename Specifies the file(s) to delete. Specify multiple files by using wildcards.
    /P Prompts for confirmation before deleting each file.

    There is a /p switch, but there is NO /q switch. It is NOT needed. You have confused the syntax used in Win2K with the DOS syntax.

    4) I also believe your line here is even incorrect to begin with:

    del .~mp

    This should LIKELY be "del *.~mp". You have mistakenly left off the leading wildcard.

    5) You incorrectly state that using del *.* would "clear out all the files in your Temp folder". This is obviously an exageration as the DEL command cannot clear out any files in sub-folders. You would need to use "deltree" in Win9x and "rd" in WinNT-XP.

    6) Your technique requires the user to trigger the event for it to run. That is not exactly convenient.
    _____________________________

    In summary, your method:

    1) Requires user intervention to run.
    2) Incompletely cleans out the TEMP folder
    3) Has several coding errors and inconsistencies.

    My method:

    1) Is automatic and requires no user intervention.
    2) Completely clears out the entire TEMP folder, not just part of it.
    3) Has absolutely no coding errors.

    Perhaps you should stay IN more! ;-]

  10. #10
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    The humour escapes me. I should get out more...
    <img src=/S/igiveup.gif border=0 alt=igiveup width=31 height=23>
    Attached Files Attached Files

  11. #11
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    1) Requires user intervention to run. : sure does, entirely on purpose
    2) Incompletely cleans out the TEMP folder : sure does, entirely on purpose
    3) Has several coding errors and inconsistencies : the odd typo has been corrected. Thanks for the warnings. The changes I consider necessary have been made.

    My method has worked in Win 9x and Win 2kP, and continues to work in XPP, exactly as I want it. ymmv

    Rgds

  12. #12
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    edited by MerC to remove anything in the least bit controversial, potentially offensive and PuC. And the yellow text. I don't want to frighten the horses...

    Rick

    1. I never use a statement from within autoexec.bat to delete anything at all, and I did not imply that I did. Nor would I suggest that anyone else should do it.

    To quote from my previous post :
    " I agree that in the autoexec .bat file there should not be placed any statement that Deletes things on start-up". Couldn't be much clearer than that.

    2. The point of rebooting to complete an installation is that the installation completes during the boot process. Once this is complete, and Windows is in operation, if any FILES remain, they can be removed. I do not remove folders, but only files with the .tmp or .~mp extensions. If you can demonstrate the usefulness of a *.tmp file that is there after a boot and therefore at the start of a Windows session, please do so.

    3. Your question : "Well, the question that COULD have followed (but did not) was "WHEN and HOW can you delete the TEMP folder"? It did not follow, because it is not something I would want to do. My reply is <font color=red> NEVER try to Delete the TEMP folder</font color=red>. I did suggest that Windows wouldn't let you anyway. Why would you need to remove the folder itself? I am perfectly aware it is a system file with a number of uses. My contention is that the files within it with .tmp or similar extensions are not needed once the system has been re-booted - assuming they are still there. If you mean 'empty' or 'clean' it then :

    "When" - Answered clearly in a previous post " This is why I suggest cleaning out that particular folder at the start of the day - assuming you switch on and off."
    "How" - Full instructions are in the .doc or .pdf files on my website.

    Thus the correct question was not only asked, but answered as well.

    4. The automatic clean-up process I suggest has nothing at all to do with autoexec.bat, and occurs only when Windows has fully loaded. It uses a .bat file, but one that users construct and run themselves. It does NOT run as part of the boot process.

    I'm afraid you've repeated what has been said in previous posts. You could start by getting the docs I mention, and by all means criticise their content if you feel they are inaccurate or incorrect. But please, in the interests of light rather than heat, if you are going to comment on things I've said or suggested, do ensure I've actually done so.

    Rgds

  13. #13
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    Glad to be of service. ;-]

    I believe that Tricky, the user who initially posted in this thread (eh, the one that we completely drove away!), was looking for something that did NOT require user intervention. It was Tricky that began this thread refering to the autoexec.bat file.

    While you created your method to purposefully depend on user intervention, that does NOT appear to be the desire or goal of the original poster.

    I will never understand why anyone would incompletely clean out the Temp folder -- if the entire folder contains temporary information, why not kill the whole thing at one time? What is the point of partially cleaning out this folder?

    If you only found *one* odd typo, then obviously something is still escaping you... ;-]

    As expected, I have techniques to perform this maneuver in any version of Windows as well. HOWEVER, the initial poster -- who you seem to keep forgetting about -- is asking about Win98.

    Cheers. Have a Guiness on me! You could use it.

  14. #14
    Uranium Lounger
    Join Date
    Mar 2001
    Location
    New Jersey
    Posts
    6,684
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Re: Win98 Temp Dirs

    Gentlemen !! Might I suggest pistols at 40 paces ???
    A bit of perspective here, if you please !! <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    <IMG SRC=http://www.wopr.com/w3tuserpics/DocWatson_sig.gif>

  15. #15
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Win98 Temp Dirs

    Either that, or the sandbox. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> I was wondering where Tricky went and if the information here solved the problem or answered the question.

    Debate is a good thing as long as it doesn't get personal!
    -Mark

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •