Solved

Windows Temp files.

Posted on 2000-05-03
9
241 Views
Last Modified: 2013-12-28
What extension(s) do I need to add to:

echo | del c:\windows\temp\*.*

to delete  hidden files in the windows temp folder.  This is ran as a batch file and cleans out temp files when a users logs on.








0
Comment
Question by:pbut835581
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Accepted Solution

by:
israely earned 100 total points
ID: 2774810
add this line before the line you have listed:

attrib c:\windows\temp\*.* -h

I have never seen hidden files in temp directory.
0
 
LVL 3

Expert Comment

by:israely
ID: 2774819
Type:

attrib /?

to see all the switches avaiable at the dos prompt.
0
 
LVL 1

Expert Comment

by:m_santo
ID: 2774829
The *.* will make it delete all files with all extensions in the folder, already.

It will not, however, delete any subfolders.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:m_santo
ID: 2774835
m_santo changed the proposed answer to a comment
0
 
LVL 1

Expert Comment

by:m_santo
ID: 2774849
Whoops, I misread the question.  Missed the part about hidden files.  Sorry.
0
 
LVL 1

Expert Comment

by:m_santo
ID: 2774888
Whoops, I misread the question.  Missed the part about hidden files.  Sorry.
0
 
LVL 1

Expert Comment

by:red117
ID: 2775166
Why dont you just try deltree c:\windows\temp and delete the whole temp directory, when it tries to write to it again it will remake the directory.
0
 
LVL 7

Expert Comment

by:Ajnin
ID: 2775214
red117 idea is good, but to make not prompt the user, try the following syntax:
echo. Y|deltree c:\windows\temp
0
 

Author Comment

by:pbut835581
ID: 2775300
Thank you very much.  
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question