Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

A file match for *.tmp also returns various *.tmpll files, is there anyway to restrict it to *.tmp files only?

dir C:\*.tmp /s

Also lists a load of *.tmpll files as well.

Reason for doing this is to provide a simple way of deleting all windows temp files now that CleanMgr has been removed from Server 2012. Even if restored CleanMgr no-longer works properly, it doesn't have options for deleting temp files only recycle bin and thumbnails.

share|improve this question
    
Why exactly do you want to do this? What benefit is there? –  MDMarra Feb 15 '13 at 11:47
    
As mentioned in original post: CleanMgr no-longer works so server 2012 does not have any way of clearing temp files. Temp files cannot be left to build up forever without causing problems so looking for a way of clearing temp files, like clearmgr used to do. –  NickC Mar 26 '13 at 10:18

1 Answer 1

As a partial answer you could exclude the tpmll files with the following command:

dir C:\*.tmp /s | findstr /vi "\.tmpl"

You'll probably find other things...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.