Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

Windows Temp files.

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
pbut835581
Asked:
pbut835581
1 Solution
 
israelyCommented:
add this line before the line you have listed:

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

I have never seen hidden files in temp directory.
0
 
israelyCommented:
Type:

attrib /?

to see all the switches avaiable at the dos prompt.
0
 
m_santoCommented:
The *.* will make it delete all files with all extensions in the folder, already.

It will not, however, delete any subfolders.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
m_santoCommented:
m_santo changed the proposed answer to a comment
0
 
m_santoCommented:
Whoops, I misread the question.  Missed the part about hidden files.  Sorry.
0
 
m_santoCommented:
Whoops, I misread the question.  Missed the part about hidden files.  Sorry.
0
 
red117Commented:
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
 
AjninCommented:
red117 idea is good, but to make not prompt the user, try the following syntax:
echo. Y|deltree c:\windows\temp
0
 
pbut835581Author Commented:
Thank you very much.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now