Can I dlelete the entire temp directory

M

mm

I found not merely a file but a whole directory called temp
somewhere deep in the Documents and Settings\user\Local Settngs
directory of win2000 (and winxp fwiw).

Can I delete everything in it, that is everything that is more than a
week old? Since it's called "temp".

(The truth is I might not delete this stuff, but I've been backing it
up, and I want to delete .tmp files from my back-up drive. But the
thought of a whole directory named temp filled with .tmp files, but
also .cab files and .exe files, scares me.)

Thanks
 
M

mm

I found not merely a file but a whole directory called temp
somewhere deep in the Documents and Settings\user\Local Settngs
directory of win2000 (and winxp fwiw).

Can I delete everything in it, that is everything that is more than a
week old? Since it's called "temp".

And what about .tmp files marked Read Only and some others marked
System File. How can a .tmp file be a system file???????
 
D

Dave Patrick

With no application installs pending and after restart you can empty the
\temp directory.


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
M

Mohan...

mm said:
I found not merely a file but a whole directory called temp
somewhere deep in the Documents and Settings\user\Local Settngs
directory of win2000 (and winxp fwiw).

Can I delete everything in it, that is everything that is more than a
week old? Since it's called "temp".

(The truth is I might not delete this stuff, but I've been backing it
up, and I want to delete .tmp files from my back-up drive. But the
thought of a whole directory named temp filled with .tmp files, but
also .cab files and .exe files, scares me.)

Thanks

The Temp folder is used by Windows, some applications during install to
unpack installers, and many applications when being run. Some delete on
exit, but most leave them out. These can be safely deleted (excepting
those dated today that may be in use), and if left as is, continue to
bloat and consume enormous disk space. There is no need to back them up.

Do not delete the Folder itself, only the contents! Close all running
programs, and run the Windows Disk Cleanup periodically (Start/ Run/
Cleanmgr "OR" Start/ Run/ Programs/ System tools/ Disk Cleanup)

There are many nice third-party utilities as well. "CleanIt" from
http://www.silmarilsoftware.com/cleanit/index_eng.htm deletes the
contents each time Windows starts (after a confirmation on the directory
path during the first run). "CCleaner" is another app. to clear both
this and the "WinNT\Temp" folder manually.

Mohan...
 
M

mm

The Temp folder is used by Windows, some applications during install to
unpack installers, and many applications when being run. Some delete on
exit, but most leave them out. These can be safely deleted (excepting
those dated today that may be in use), and if left as is, continue to
bloat and consume enormous disk space. There is no need to back them up.

Good to know. Actually, I have to make extra efforts to not back
something up. In fact, so far, I've only stopped backing up .tmp
files. I have to read the instructions for XXCOPY again about how to
exclude a "temp" directory, especially since the fully qualified name
includes a user name, that varies from harddrive to harddrive. I'm
trying to use the same Exclusion File for any hard drive I back up,
and they all have different users. (A friend's before I work on it;
one of mine still in the name of the guy who gave it to me, etc.)
But I'll get it

This is more than you needed to know. Sorry.
Do not delete the Folder itself, only the contents! Close all running
programs, and run the Windows Disk Cleanup periodically (Start/ Run/
Cleanmgr "OR" Start/ Run/ Programs/ System tools/ Disk Cleanup)

There are many nice third-party utilities as well. "CleanIt" from
http://www.silmarilsoftware.com/cleanit/index_eng.htm deletes the
contents each time Windows starts (after a confirmation on the directory
path during the first run). "CCleaner" is another app. to clear both
this and the "WinNT\Temp" folder manually.

Mohan...

Thanks to you and to Dave.
 
S

Sid Elbow

Mohan... said:
Do not delete the Folder itself, only the contents!

I would have assumed that Windows would be smart enough to re-create the
temp directory if it had been deleted - in fact I'm sure earlier
versions did.
 
M

mm

I would have assumed that Windows would be smart enough to re-create the
temp directory if it had been deleted - in fact I'm sure earlier
versions did.

But if it doesn't, then there are files and broken files all over the
inside of the computer. I would just let them sit there, but my wife
insists on cleaning up. Once she insisted we open the harddrive to
clean up the broken files in that.
 
M

Mohan...

Sid said:
I would have assumed that Windows would be smart enough to re-create the
temp directory if it had been deleted - in fact I'm sure earlier
versions did.

It probably would recreate (for being an environment variable) if
deleting the entire folder is immediately followed by a reboot. May not
be safe to delete while continuing to work, as even the harmless things
like printers/scanners keep writing some temporary stuff.

I remember with Win98, it was possible to insert a line into
Autoexec.bat to delete the contents, or delete the Temp folder itself,
with a next line to recreate using MakeDir, as the whole thing would run
before Windows loaded. But that probably doesn't work with later versions.

Thanks
Mohan...
 
B

Buffalo

mm said:
But if it doesn't, then there are files and broken files all over the
inside of the computer. I would just let them sit there, but my wife
insists on cleaning up. Once she insisted we open the harddrive to
clean up the broken files in that.

You don't have to open up the HDD, all you have to do is put it in the
dishwasher to clean it up. :)
Buffalo
 
J

John Dulak

Buffalo said:
You don't have to open up the HDD, all you have to do is put it in the
dishwasher to clean it up. :)
Buffalo

Buffalo:

If you want to do it by hand there are step by step instructions with
pictures here ;-)

http://www.datadocktorn.nu/us_frag1.php

John


--
\\\||///
------------------o000----(o)(o)----000o----------------
----------------------------()--------------------------
'' Madness takes its toll - Please have exact change. ''

John Dulak - 40.4913ºN,79.904ºW - http://tinyurl.com/2qs6o6
 
M

mm

It probably would recreate (for being an environment variable) if
deleting the entire folder is immediately followed by a reboot. May not
be safe to delete while continuing to work, as even the harmless things
like printers/scanners keep writing some temporary stuff.

I remember with Win98, it was possible to insert a line into
Autoexec.bat to delete the contents, or delete the Temp folder itself,
with a next line to recreate using MakeDir, as the whole thing would run
before Windows loaded. But that probably doesn't work with later versions.

Does win2000 have a Start directory that will run any program in it
when you start windows? I think so.

What about when you close windows? Does 2000 or XP have a way to run
something, like a backup program, in the process of shutting down
Windows?
 
M

Mohan...

mm said:
Does win2000 have a Start directory that will run any program in it
when you start windows? I think so.

What about when you close windows? Does 2000 or XP have a way to run
something, like a backup program, in the process of shutting down
Windows?

All Windows versions have a Startup folder: Start/ Programs/ Startup.
Double click this to open a folder Window, and create a new shortcut
here to any program (or even a document).
However, I haven't heard of an "Endup" folder to do the same while
shutting down! Use the Task Scheduler (Control Panel/ Scheduled tasks)
to run something at a specified time. Or may be a batch file could be
created to run your backup first, and then shut down Windows.

Mohan...
 
M

mm

All Windows versions have a Startup folder: Start/ Programs/ Startup.
Double click this to open a folder Window, and create a new shortcut
here to any program (or even a document).
However, I haven't heard of an "Endup" folder to do the same while
shutting down! Use the Task Scheduler (Control Panel/ Scheduled tasks)
to run something at a specified time. Or may be a batch file could be
created to run your backup first, and then shut down Windows.

I could do that.

Win3.1 and/or more likely win98 has something that will run on exiting
windows. That's one reason I asked.
 
D

Dave Patrick

Use the Group policy editor.
%systemroot%\system32\gpedit.msc

User Config\Windows Settings\Scripts\Logon/Logoff
Computer Config\Windows Settings\Scripts\Startup/Shutdown

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
<snip>
 
M

Mohan...

Dave said:
Use the Group policy editor.
%systemroot%\system32\gpedit.msc

User Config\Windows Settings\Scripts\Logon/Logoff Computer
Config\Windows Settings\Scripts\Startup/Shutdown

Thanks, that was a nice tip. I now run my backup before shutdown.

Mohan...
 
M

mm

Thanks also.
Thanks, that was a nice tip. I now run my backup before shutdown.

The problem with that is, Is this a backup of just the data, or the
whole system? If the second, what if I screwed something up in that
session and don't know it yet.

In general how is that handled.

I had software that kept track of the last n versions of a file, but
it malfunctioned and cost me a whole gigabyte of files. (There was a
program fix but I didn't know about it. :( Still, it's one thing not
to be perfect, and another thing to delete almost everything it
touched. So I don't want to use that anymore. )
 
M

Mohan...

mm said:
Thanks also.


The problem with that is, Is this a backup of just the data, or the
whole system? If the second, what if I screwed something up in that
session and don't know it yet.

In general how is that handled.

I had software that kept track of the last n versions of a file, but
it malfunctioned and cost me a whole gigabyte of files. (There was a
program fix but I didn't know about it. :( Still, it's one thing not
to be perfect, and another thing to delete almost everything it
touched. So I don't want to use that anymore. )

How and what to Backup varies with each user. You can safely use Windows
Backup (Start/ Programs/ Accessories/ System tools/ Backup) to archive
both system and personal data under separate backups. These are easy to
restore, and won't delete anything.

I use Windows Backup for only System State Data periodically, and
DSynchronize, a small freeware executable (portable) for other things
regularly (now during shutdown).

Mohan...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top