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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The *.* will make it delete all files with all extensions in the folder, already.
It will not, however, delete any subfolders.
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
echo. Y|deltree c:\windows\temp
ASKER
Thank you very much.
attrib /?
to see all the switches avaiable at the dos prompt.