Home Page link  

Delete files from TEMP directory= c:\windows\system32\cmd.exe /c del %TEMP%\*.* /q

 

Quicken Personal Finance Discussions - Quicken - personal finance software discussions

 Post an article  get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Delete files from TEMP directory= c:\windows\system32\cmd.exe /c del %TEMP%\*.* /q Bob Wang 11-21-2007
Posted by Bob Wang on November 21, 2007, 9:43 pm
Please log in for more thread options
A suggestion by Andrew deFaria got me to thinking about temporary files left
behind by applications other than Quicken.

I created a Scheduled Task that runs once a day, after Quicken's Scheduled
Update:

c:windowssystem32cmd.exe /c del %TEMP%*.* /q

HTH someone else

Bob



Posted by Andrew DeFaria on November 21, 2007, 10:38 pm
Please log in for more thread options
This is a multi-part message in MIME format.
--------------090602080807090309020206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Bob Wang wrote:
> A suggestion by Andrew deFaria got me to thinking about temporary
> files left behind by applications other than Quicken.
>
> I created a Scheduled Task that runs once a day, after Quicken's
> Scheduled Update:
>
> c:windowssystem32cmd.exe /c del %TEMP%*.* /q
>
> HTH someone else
That's a nice Windows based solution (BTW you don't need
C:windowssystem32 - just cmd.exe as that should always be in your
PATH). Couple of points:

* You might want to add a /s switch to remove all subdirectories
* You may or make not really wish to get rid of everything in
%TEMP%. I, for example, use %TEMP% for temporary storage. IOW I
may have something in there, for example, Firefox 3.0 Beta 1
Setup.exe, that I may wish to deal with but maybe not for a few
days. I don't want it being whacked away.
* The above simple approach does nothing for things that cannot be
deleted because they are currently in use. My script hides such
files by flipping on the hidden bit.

But in general I wish applications would be better about cleaning up
their mess in tmp. Quicken's a pretty bad offender...
--
Andrew DeFaria <http://defaria.com>
How can you tell when the blue cheese goes bad?

--------------090602080807090309020206
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Bob Wang wrote:
<blockquote cite="mid:kpmdnSTIQ4ApcdnanZ2dnUVZ_vqpnZ2d@comcast.com"
type="cite">A suggestion by Andrew deFaria got me to thinking about
temporary files left behind by applications other than Quicken.<br>
<br>
I created a Scheduled Task that runs once a day, after Quicken's
Scheduled Update:<br>
<br>
c:windowssystem32cmd.exe /c del %TEMP%*.* /q<br>
<br>
HTH someone else<br>
</blockquote>
That's a nice Windows based solution (BTW you don't need
C:windowssystem32 - just cmd.exe as that should always be in your
PATH). Couple of points:<br>
<ul>
<li>You might want to add a /s switch to remove all subdirectories</li>
<li>You may or make not really wish to get rid of everything in
%TEMP%. I, for example, use %TEMP% for temporary storage. IOW I may
have something in there, for example, Firefox 3.0 Beta 1 Setup.exe,
that I may wish to deal with but maybe not for a few days. I don't want
it being whacked away.</li>
<li>The above simple approach does nothing for things that cannot be
deleted because they are currently in use. My script hides such files
by flipping on the hidden bit. <br>
</li>
</ul>
But in general I wish applications would be better about cleaning up
their mess in tmp. Quicken's a pretty bad offender...<br>
<div class="moz-signature">-- <br>
<a href="http://defaria.com">Andrew DeFaria</a><br>
<small><font color="#999999">How can you tell when the blue cheese goes
bad?</font></small>
</div>
</body>
</html>

--------------090602080807090309020206--

Posted by Bob Wang on November 21, 2007, 11:45 pm
Please log in for more thread options
Andrew:

Good point, forgot that applications also create directories in the TEMP
folder.
So, the quick and dirty Scheduled Tasks I use are now two:

c:windowssystem32cmd.exe /c del %TEMP%*.* /q /s

c:windowssystem32cmd.exe /c rd %TEMP% /q /s

Thanks for amplifying,
Bob

>>>
Bob Wang wrote:
A suggestion by Andrew deFaria got me to thinking about temporary files left
behind by applications other than Quicken.

I created a Scheduled Task that runs once a day, after Quicken's Scheduled
Update:

c:windowssystem32cmd.exe /c del %TEMP%*.* /q

HTH someone else

That's a nice Windows based solution (BTW you don't need
C:windowssystem32 - just cmd.exe as that should always be in your PATH).
Couple of points:

You might want to add a /s switch to remove all subdirectories
You may or make not really wish to get rid of everything in %TEMP%. I, for
example, use %TEMP% for temporary storage. IOW I may have something in
there, for example, Firefox 3.0 Beta 1 Setup.exe, that I may wish to deal
with but maybe not for a few days. I don't want it being whacked away.
The above simple approach does nothing for things that cannot be deleted
because they are currently in use. My script hides such files by flipping on
the hidden bit.

But in general I wish applications would be better about cleaning up their
mess in tmp. Quicken's a pretty bad offender...

--
Andrew DeFaria
How can you tell when the blue cheese goes bad?



Posted by Andrew DeFaria on November 22, 2007, 12:26 pm
Please log in for more thread options
This is a multi-part message in MIME format.
--------------010005060808030400050602
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Bob Wang wrote:
> Andrew:
>
> Good point, forgot that applications also create directories in the TEMP
> folder.
> So, the quick and dirty Scheduled Tasks I use are now two:
>
> c:windowssystem32cmd.exe /c del %TEMP%*.* /q /s
>
> c:windowssystem32cmd.exe /c rd %TEMP% /q /s
>
> Thanks for amplifying,
Ugh! You still don't need C:WindowsSystem32 - just cmd.exe, or even
shorter, just cmd.

And you don't want that second one. That says to remove the %TEMP%
directory altogether. Thereafter I suspect you'll see many failures in
software as they probably assume that %TEMP% already exists.

Finally, the first one, del %TEMP%*.* /q /s is sufficient as it will
remove everything in %TEMP% including directories (due to the /s option).

Oh and it still doesn't get rid of files and directories that are open.
I'm assuming you don't care about that.

On a slightly off tangent note, I use Process Explorer from Sys
Internals (now part of MS) to find who has files/dirs still open. I find
a lot of ~DF<some number>.tmp and Perflib_Perfdata_<some number> files
hanging out in %TEMP%. I have no idea why such files are open and I use
Process Explorer to forcibly close them. It never seems to do any harm
to the processes themselves. Process Explorer itself often has one of
them Preflib files open. If anybody knows what causes such files to come
into existence and how one might configure them to not be created then
let me know. It seems to be related to performance related monitoring
and really I do not wish to monitory performance nor have to clean up
these silly files...
--
Andrew DeFaria <http://defaria.com>
The average woman would rather have beauty than brains because the
average man can see better than he can think.

--------------010005060808030400050602
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Bob Wang wrote:
<blockquote cite="mid:CdmdnUx2B4rWlNjanZ2dnUVZ_vyinZ2d@comcast.com"
type="cite">Andrew:<br>
<br>
Good point, forgot that applications also create directories in the
TEMP <br>
folder.<br>
So, the quick and dirty Scheduled Tasks I use are now two:<br>
<br>
c:windowssystem32cmd.exe /c del %TEMP%*.* /q /s<br>
<br>
c:windowssystem32cmd.exe /c rd %TEMP% /q /s<br>
<br>
Thanks for amplifying,<br>
</blockquote>
Ugh! You still don't need C:WindowsSystem32 - just cmd.exe, or even
shorter, just cmd.<br>
<br>
And you don't want that second one. That says to remove the %TEMP%
directory altogether. Thereafter I suspect you'll see many failures in
software as they probably assume that %TEMP% already exists.<br>
<br>
Finally, the first one, del %TEMP%*.* /q /s is sufficient as it will
remove everything in %TEMP% including directories (due to the /s
option).<br>
<br>
Oh and it still doesn't get rid of files and directories that are open.
I'm assuming you don't care about that.<br>
<br>
On a slightly off tangent note, I use Process Explorer from Sys
Internals (now part of MS) to find who has files/dirs still open. I
find a lot of ~DF&lt;some number&gt;.tmp and Perflib_Perfdata_&lt;some
number&gt; files hanging out in %TEMP%. I have no idea why such files
are open and I use Process Explorer to forcibly close them. It never
seems to do any harm to the processes themselves. Process Explorer
itself often has one of them Preflib files open. If anybody knows what
causes such files to come into existence and how one might configure
them to not be created then let me know. It seems to be related to
performance related monitoring and really I do not wish to monitory
performance nor have to clean up these silly files...<br>
<div class="moz-signature">-- <br>
<a href="http://defaria.com">Andrew DeFaria</a><br>
<small><font color="#999999">The average woman would rather have beauty
than brains because the average man can see better than he can
think.</font></small>
</div>
</body>
</html>

--------------010005060808030400050602--

Posted by Bob Wang on November 22, 2007, 1:15 pm
Please log in for more thread options
YMMV.

1) The del /s command DOES NOT remove ALL directories for me.

2) I need the rd command to remove directories like __SkypeIEToolbar_Cache

3) And, precisely BECAUSE there's Perflib_Perfdata_e4c.dat, ~DFBFF1.tmp and
WCESLog.log in the TEMP directory, the TEMP directory itself is not deleted.

4) I include the full path and extension just for completeness sake.

Bob
P.S. Thanks for your input, but can we drop the subject now?

>>
Bob Wang wrote:
Andrew:

Good point, forgot that applications also create directories in the TEMP
folder.
So, the quick and dirty Scheduled Tasks I use are now two:

c:windowssystem32cmd.exe /c del %TEMP%*.* /q /s

c:windowssystem32cmd.exe /c rd %TEMP% /q /s

Thanks for amplifying,

Ugh! You still don't need C:WindowsSystem32 - just cmd.exe, or even
shorter, just cmd.

And you don't want that second one. That says to remove the %TEMP% directory
altogether. Thereafter I suspect you'll see many failures in software as
they probably assume that %TEMP% already exists.

Finally, the first one, del %TEMP%*.* /q /s is sufficient as it will remove
everything in %TEMP% including directories (due to the /s option).

Oh and it still doesn't get rid of files and directories that are open. I'm
assuming you don't care about that.

On a slightly off tangent note, I use Process Explorer from Sys Internals
(now part of MS) to find who has files/dirs still open. I find a lot of
~DF<some number>.tmp and Perflib_Perfdata_<some number> files hanging out in
%TEMP%. I have no idea why such files are open and I use Process Explorer to
forcibly close them. It never seems to do any harm to the processes
themselves. Process Explorer itself often has one of them Preflib files
open. If anybody knows what causes such files to come into existence and how
one might configure them to not be created then let me know. It seems to be
related to performance related monitoring and really I do not wish to
monitory performance nor have to clean up these silly files...

--
Andrew DeFaria
The average woman would rather have beauty than brains because the average
man can see better than he can think.



Similar ThreadsPosted
Quicken temp files left on system? August 27, 2007, 1:09 pm
temp file etc cleaner - ATF cleaner November 22, 2007, 5:06 pm
Anyone interested: Manage Quicken Backup Directory Files August 3, 2006, 3:21 pm
Household Inventory Save Directory??? November 7, 2006, 7:30 pm
Quicken backup vs sub-directory copy January 12, 2007, 8:23 am
cannot delete security February 5, 2007, 11:56 am
cannot delete security February 5, 2007, 11:57 am
Unable to delete security February 5, 2007, 11:52 am
Delete savings plan December 30, 2007, 11:50 am
Delete Report Copies January 13, 2008, 2:33 pm

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap