Temporary Folders

R

Rokmier

Is it true that so long as the folder is a temp folder it is safe to delete
anything in it

Example:
C:\Documents and settings\Richard\Local Settings\Temp

This is just one, so my question again is "Does it matter, so long as the
folder says Temp, It is ok to delete it, right?

Thenk you for any help
 
P

Pegasus [MVP]

Rokmier said:
Is it true that so long as the folder is a temp folder it is safe to
delete
anything in it

Example:
C:\Documents and settings\Richard\Local Settings\Temp

This is just one, so my question again is "Does it matter, so long as the
folder says Temp, It is ok to delete it, right?

Thenk you for any help

Yes, by convention all files with a .tmp extension and all folders called
"Temp" contain only temporary data. However, you must recreate the folder
after deleting it.
 
I

Ian D

Rokmier said:
Is it true that so long as the folder is a temp folder it is safe to
delete
anything in it

Example:
C:\Documents and settings\Richard\Local Settings\Temp

This is just one, so my question again is "Does it matter, so long as the
folder says Temp, It is ok to delete it, right?

Thenk you for any help

You can click the Temp folder, then press Ctrl+A to select all
contents for deletion. You may find that some files are in use
and cannot be deleted. These are usually Perflib_Perfdata files.
 
T

Tim Meddick

As "Pegasus" says, it is very important that you do not erase the folder itself along
with the contents.

If you do and there is no "Temp" folder in that location anymore, some programs may
fail to start or "crash" because they have nowhere to write their temporary data
files to...

On the other hand, it is a very good idea to delete the contents of Temp folders as
they can accrue large amounts of data that is, after all, temporary.

The same thing goes for your Temp Inet Files folder.

But you can delete the contents of all your Temp / Temp Inet folders and other
temporary files, safely, by typing :

cleanmgr.exe

....into the "Run" box, choose the drive you want to "clean" and check the boxes of
those locations you want purging.

This will do the job in a quick and "safe" manner - all in one go.

==

Cheers, Tim Meddick, Peckham, London. :)
 
N

NEW ANON

Ignore everything written by muppets thus far.

It is true that anything in TEMP folder can be deleted without any side
effects to the system or programs.

The folders in question are:

C:\Documents and settings\USERNAME\Local Settings\Temp
C:\WINDOWS\temp

You could also delete many log files and txt files which are created in
c:\windows folder.

Hope this helps.
 
P

Paul

Rokmier said:
Is it true that so long as the folder is a temp folder it is safe to delete
anything in it

Example:
C:\Documents and settings\Richard\Local Settings\Temp

This is just one, so my question again is "Does it matter, so long as the
folder says Temp, It is ok to delete it, right?

Thenk you for any help

One place you can start is

Control Panels : System : Advanced : Environment Variables

(where the Environment Variables is a button near the bottom)

you can find various environment variables defined. The
"Temp" folders defined by those variables, hint that these
would be special places for temporary storage.

If a file is "busy" or "in use", and is located in a temporary
folder, you won't be able to erase it. Similarly, if you know
a file is currently in usage by an application, it would be
silly to throw it away.

You, as the user, can define as many folders named "Temp" as you
want. The name by itself is insufficient to conclude it can
be emptied without a side effect. But the environment variables
hint as to the purpose of some of those folders.

I clean the %USERPROFILE%\Local Settings\Temp folder on an
infrequent basis, by booting a Linux LiveCD and erasing the
files from there. That way, WinXP is not running, and no
file in the folder can be "busy" and deny my attempts to
erase it. If I need to look around the disk for any reason,
that is my favorite method of doing so.

I use Knoppix. The latest version supports FAT32 and NTFS.
You have to set the properties of a drive to "write-able",
before you can make changes to a drive. So, by design,
Knoppix won't make permanent changes to anything, unless
you explicitly give it permission.

http://en.wikipedia.org/wiki/List_of_live_CDs

Paul
 
P

Pegasus [MVP]

Paul said:
I clean the %USERPROFILE%\Local Settings\Temp folder on an
infrequent basis, by booting a Linux LiveCD and erasing the
files from there. That way, WinXP is not running, and no
file in the folder can be "busy" and deny my attempts to
erase it. If I need to look around the disk for any reason,
that is my favorite method of doing so.

I use Knoppix. The latest version supports FAT32 and NTFS.
You have to set the properties of a drive to "write-able",
before you can make changes to a drive. So, by design,
Knoppix won't make permanent changes to anything, unless
you explicitly give it permission.

IMHO, booting a machine with a Linux boot CD in order to clean a few locked
..tmp files seems somewhat over the top. You might perhaps gain 1 MByte,
which would be one thousandth of one percent of disk capacity of your
average hard disk. Chances are that these same files become unlocked after
an ordinary reboot.
 
T

Tim Meddick

I repeat : an easy and secure way of getting rid of all such temporary and deletable
files - at the same time - automatically excluding files that are "in use" - is to
use the Cleanup Manager (Windows built-in) by typing :

cleanmgr.exe

....into the "Run" box on your 'Start Menu'...

==

Cheers, Tim Meddick, Peckham, London. :)
 
B

Bennett Marco

Paul said:
One place you can start is

Control Panels : System : Advanced : Environment Variables
[snip of a bunch of irrelevant crap]

WTF does all of that have to do with the OP's basic question?

A simple answer would have been "Yes, you can delete anything in a
temp folder. If any file is currently in use, the system will not
delete it."
 
P

Paul

Bennett said:
Paul said:
One place you can start is

Control Panels : System : Advanced : Environment Variables
[snip of a bunch of irrelevant crap]

WTF does all of that have to do with the OP's basic question?

A simple answer would have been "Yes, you can delete anything in a
temp folder. If any file is currently in use, the system will not
delete it."

The environment variable points to what is currently the temporary directory.
That is how you know it is temporary. There is nothing magic about the name.

I mention that, in case somebody gets the idea you can attack every
temp directory you ever see. There are people that clever around.

As for why you take extra caution cleaning the temporary directory,
on occasion there are things in there which refuse to delete. But
they cannot argue with you, when WinXP is not running.

Paul
 
T

Tim Meddick

Why would *any* application or user, create such folder named "Temp" if there was
anything BUT deletable data within them - that's just ridiculous!

I would have said that defiantly - by all the rules of common sense - any folder
called "Temp" can indeed be deleted with impunity...

==

Cheers, Tim Meddick, Peckham, London. :)




Paul said:
Bennett said:
Paul said:
Rokmier wrote:
Is it true that so long as the folder is a temp folder it is safe to delete
anything in it

Example:
C:\Documents and settings\Richard\Local Settings\Temp

This is just one, so my question again is "Does it matter, so long as the folder
says Temp, It is ok to delete it, right?

Thenk you for any help
One place you can start is

Control Panels : System : Advanced : Environment Variables
[snip of a bunch of irrelevant crap]

WTF does all of that have to do with the OP's basic question?

A simple answer would have been "Yes, you can delete anything in a
temp folder. If any file is currently in use, the system will not
delete it."

The environment variable points to what is currently the temporary directory.
That is how you know it is temporary. There is nothing magic about the name.

I mention that, in case somebody gets the idea you can attack every
temp directory you ever see. There are people that clever around.

As for why you take extra caution cleaning the temporary directory,
on occasion there are things in there which refuse to delete. But
they cannot argue with you, when WinXP is not running.

Paul
 
T

Tim Meddick

Sorry, I forgot to add that, as in other posts have stated in this thread, for most
"Temp" folders, only the contents can be deleted.

If you delete the actual containing folder called "Temp" you must (in most cases)
re-create an empty folder named "Temp" to replace the one deleted.

Not to do so can cause the application that created it not to run properly or cause a
crash.

In the case of the "Temp" folders that are specified by system variables, the
problems can be even more wide ranging if the folder was left non-existant...

==

Cheers, Tim Meddick, Peckham, London. :)




Tim Meddick said:
Why would *any* application or user, create such folder named "Temp" if there
was anything BUT deletable data within them - that's just ridiculous!

I would have said that defiantly - by all the rules of common sense - any folder
called "Temp" can indeed be deleted with impunity...

==

Cheers, Tim Meddick, Peckham, London. :)




Paul said:
Bennett said:
Rokmier wrote:
Is it true that so long as the folder is a temp folder it is safe to delete
anything in it

Example:
C:\Documents and settings\Richard\Local Settings\Temp

This is just one, so my question again is "Does it matter, so long as the
folder says Temp, It is ok to delete it, right?

Thenk you for any help
One place you can start is

Control Panels : System : Advanced : Environment Variables
[snip of a bunch of irrelevant crap]

WTF does all of that have to do with the OP's basic question?

A simple answer would have been "Yes, you can delete anything in a
temp folder. If any file is currently in use, the system will not
delete it."

The environment variable points to what is currently the temporary directory.
That is how you know it is temporary. There is nothing magic about the name.

I mention that, in case somebody gets the idea you can attack every
temp directory you ever see. There are people that clever around.

As for why you take extra caution cleaning the temporary directory,
on occasion there are things in there which refuse to delete. But
they cannot argue with you, when WinXP is not running.

Paul
 
P

Paul

Tim said:
Why would *any* application or user, create such folder named "Temp"
if there was anything BUT deletable data within them - that's just
ridiculous!

I would have said that defiantly - by all the rules of common sense -
any folder called "Temp" can indeed be deleted with impunity...

==

Cheers, Tim Meddick, Peckham, London. :)


I worked with a person, who created one folder after another
with Temp in it. He would put a Temp folder inside a Temp folder
and so on. As the local computer help person in my group
at that time, I'd get to see some pretty strange things.
The funny thing is, the guy was a genius at hardware design,
and designed a video accelerator before they were really
popular. I think he knew what he was doing, and the whole thing
was a joke. But rest assured, if you tried to look through
his file system, you'd get lost in a hurry. So we have to
be prepared for comedians like that.

If there is a way to abuse convention, people will find it.

Paul
 
T

Tim Meddick

User-generated folders called "Temp" are another matter. If someone creates a folder
called "Temp" and places "vital" data in them - then posts a thread to this group
asking if it's okay to delete everything in folders called "Temp" he also must be a
comedian.

I give advice based on reasonable assumptions of how a normal system would be.

Giving a general caveat that the advice may not be suitable in *every* case.

I don't give advice based on encompassing any and all eventualities incurred by
comedians.

Folders called "Temp" that are generated by the operating system or an application
would contain what? - do you think?

It is those (and only those) folders to which I refer.

==

Cheers, Tim Meddick, Peckham, London. :)




Paul said:
Tim said:
Why would *any* application or user, create such folder named "Temp" if there
was anything BUT deletable data within them - that's just ridiculous!

I would have said that defiantly - by all the rules of common sense - any folder
called "Temp" can indeed be deleted with impunity...

==

Cheers, Tim Meddick, Peckham, London. :)


I worked with a person, who created one folder after another
with Temp in it. He would put a Temp folder inside a Temp folder
and so on. As the local computer help person in my group
at that time, I'd get to see some pretty strange things.
The funny thing is, the guy was a genius at hardware design,
and designed a video accelerator before they were really
popular. I think he knew what he was doing, and the whole thing
was a joke. But rest assured, if you tried to look through
his file system, you'd get lost in a hurry. So we have to
be prepared for comedians like that.

If there is a way to abuse convention, people will find it.

Paul
 

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