Deleting Temporary Files

G

Gordon Biggar

On a routine basis, I will navigate to the Documents & Settings folder, and
then to the PrimaryUser\Temp folder to delete the temporary files that
multiply by the hundreds. These can then be deleted, if one does not mind
putting up with "sharing violation" messages.

There must be a simpler way to eliminate these files. Also, are there other
temp/unnecessary files that are growing exponentially in my computer? (I
also routinely go to Internet Explorer\Properties, and delete cookies and
Temporary Internet Files.)

I'm pleased that my Windows 2000 problems have diminished to such trivia....

Gordon Biggar
Houston, Texas
 
B

b.jeswine

In
Gordon Biggar said:
On a routine basis, I will navigate to the Documents & Settings
folder, and then to the PrimaryUser\Temp folder to delete the
temporary files that multiply by the hundreds. These can then be
deleted, if one does not mind putting up with "sharing violation"
messages.

There must be a simpler way to eliminate these files.

Billy-boy doesn't know how to clean up after himself; he pays the minions to
do that. His billions of paying custOHmers are left to fend for themselves.

http://personal.inet.fi/business/toniarts/ecleane.htm is free software
though, and perfectly useful for your expressed need..

(Listen to all the dweebs, with initials after their names in a cheap
attempt to impress you, make smart remarks now about the infallibility of
Billy-boy's Mc-M$, and then disparage the 3rd-party software that is freely
available to address all the bullshit that exists with the OS)
 
P

Pegasus \(MVP\)

Gordon Biggar said:
On a routine basis, I will navigate to the Documents & Settings folder,
and
then to the PrimaryUser\Temp folder to delete the temporary files that
multiply by the hundreds. These can then be deleted, if one does not mind
putting up with "sharing violation" messages.

There must be a simpler way to eliminate these files. Also, are there
other
temp/unnecessary files that are growing exponentially in my computer? (I
also routinely go to Internet Explorer\Properties, and delete cookies and
Temporary Internet Files.)

I'm pleased that my Windows 2000 problems have diminished to such
trivia....

Gordon Biggar
Houston, Texas

You can automate the process by placing the following commands into a batch
file that you place into your Startup folder:
@echo off
rd /s /q "%temp%"
if not exist "%temp%" md "%temp%"
 
G

Gordon Biggar

We used to call things like this "neat."

Can I presume that the "rd" command is the DOS "remove directory" command?
I notice that the folder name ("Temp") remains, as do the files where there
are sharing violations. Are all other files in a Temp directory removed,
even if they do not have a .tmp file extension? I do keep some valid files
(non .tmp extensions) in the C:\Temp folder. I would not want to have these
deleted. (I renamed this folder for the purposes of this run.)

Technical question: I tried using the "*" (asterisk) in column 1 of the
batch program on several lines for comments. The abbreviated print-out
during boot referred to these as non-valid commands, but executed the
program, regardless. Is there another symbol that can be used that the
system will ignore?

Many thanks for your assistance!

Gordon
 
P

Pegasus \(MVP\)

See below.

Gordon Biggar said:
We used to call things like this "neat."

Can I presume that the "rd" command is the DOS "remove directory" command?
I urge you to find out for yourself. Click Start/Run/cmd{OK} to open a
Command Prompt, then type
rd /? {Enter}
I notice that the folder name ("Temp") remains, as do the files where
there
are sharing violations. Are all other files in a Temp directory removed,
even if they do not have a .tmp file extension?
The "rd" command attempts to delete everything inside the %Temp%
folder, including subfolders. If you only want to move files ending on .tmp
then you must use the command
del /s "%temp%\*.tmp"{Enter}
I do keep some valid files
(non .tmp extensions) in the C:\Temp folder. I would not want to have
these
deleted. (I renamed this folder for the purposes of this run.)

Technical question: I tried using the "*" (asterisk) in column 1 of the
batch program on several lines for comments. The abbreviated print-out
during boot referred to these as non-valid commands, but executed the
program, regardless. Is there another symbol that can be used that the
system will ignore?
I don't know what you mean with "column 1" - please show us what
you did.
 
S

Stan Weiss

Gordon,
There two ways to add comments to the batch file.
1) Start the line with REM this short for Remark(s)
2) Start the line with ; a semicolon
Stan
 
P

Pegasus \(MVP\)

Stan Weiss said:
Gordon,
There two ways to add comments to the batch file.
1) Start the line with REM this short for Remark(s)
2) Start the line with ; a semicolon
Stan

Gordon Biggar wrote:

When I read your note about semicolons I thought that I had learnt something
new. Alas, this was not the case - you cannot use a semicolon as a comment
marker in a batch file. Try one or several colons instead (which, in fact,
marks the line as a label).
 
G

Gordon Biggar

I gather that the %Temp% command refers only to Temp folders encountered in
the start-up path (e.g., Documents & Settings\Local Settings\Temp). The
folders/files in the WINNT\Temp folder, for example, remain untouched. I
also presume that the C:\Temp folder would not be touched, since it is not
in the start-up path?

My asterisk in column 1 is a throw-back to the 80-column keypunch card, I'm
afraid. REM in the first three columns, if you will, as suggested by Stan
Weiss, does the trick.

Regards,

Gordon
 
P

Pegasus \(MVP\)

Gordon Biggar said:
I gather that the %Temp% command refers only to Temp folders encountered in
the start-up path (e.g., Documents & Settings\Local Settings\Temp). The
folders/files in the WINNT\Temp folder, for example, remain untouched. I
also presume that the C:\Temp folder would not be touched, since it is not
in the start-up path?
You can deal with the WinNT\Temp folder in the same way as with the %temp%
folder. All you need to do is to replace "%temp%" with "c:\WinNT\temp". No
magic here!
My asterisk in column 1 is a throw-back to the 80-column keypunch card,
I'm
afraid. REM in the first three columns, if you will, as suggested by Stan
Weiss, does the trick.
I now understand why you refer to them as "columns" - that's what people
used to say when talking about punched cards. With batch files one would ask
"How can I flag a line so that it is treated as a comment?". And yes, Stan's
"rem" statement will do the trick.
 
S

Stan Weiss

Over the years it has all runs together. Double checking the ; semicolon
was used in MASM. Sorry about that one.
 
G

Gordon Biggar

"that's what people used to say..." ooooh -- that smarts........

The asterisk in "column 1," I now remember, is a throwback to my Dbase days
in which an asterisk could be used to identify a non-executable line of
code.

As always, this Board is loaded with significant talent, willingly
dispensed, and for which I am most grateful.

Regards,

Gordon Biggar
Houston, Texas
 

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