Link to home
Start Free TrialLog in
Avatar of pbut835581
pbut835581

asked on

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.








ASKER CERTIFIED SOLUTION
Avatar of israely
israely

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of israely
israely

Type:

attrib /?

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

It will not, however, delete any subfolders.
m_santo changed the proposed answer to a comment
Whoops, I misread the question.  Missed the part about hidden files.  Sorry.
Whoops, I misread the question.  Missed the part about hidden files.  Sorry.
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.
red117 idea is good, but to make not prompt the user, try the following syntax:
echo. Y|deltree c:\windows\temp
Avatar of pbut835581

ASKER

Thank you very much.