Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a Windows utility which can search for files fulfilling certain criteria (e.g., file type is "Word" (.doc or .docx), with last modify date older than 1 year ago), and perform several actions on them all (e.g., delete them, or move them somewhere else, or copy them and change their archive bits).

What do you recommend?

share|improve this question
1  
which version of Windows? Vista+ builtin forfiles (technet.microsoft.com/en-us/library/cc753551%28v=ws.10%29.aspx) seems obvious choice for simple tasks, powershell for anything else. –  wmz Oct 19 '12 at 10:35
    
@wmz: its an answer..post it as one. –  tumchaaditya Oct 19 '12 at 11:31

3 Answers 3

The easiest would be Cygwin, but it's a bit heavyweight if you want to do just that. You can get a standalone version of find+xargs with findutils. You can then use this the same way you would on a Linux platform.

share|improve this answer

I use Directory Opus for this kind of stuff. It displays found files in one window and you can do all usual file operations on the found result.

enter image description here

share|improve this answer

For Vista and later builtin forfiles (technet.microsoft.com/en-us/library/cc753551%28v=ws.10%29.aspx) seems obvious choice for simple tasks.

(from above ms page, modified)
Syntax:

forfiles [/p <Path>] [/m <SearchMask>] [/s] [/c "<Command>"] [/d [{+|-}][{<Date>|<Days>}]]

Forfiles can select files and then run a command on them by:

File name.
File name without extension.
File name extension.
Full path of the file. Relative path of the file.
Whether it's a file or directory.
File size, in bytes. Last modified date stamp on the file.
Last modified time stamp on the file.

To run internal command (like dir attrib and so on) you would need to use cmd /c command syntax. If you need to run more than one command you can chain them with &, or put them in a batch file.

If you need something more complex (combining masks etc.) I would use powershell.

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.