Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
which version of Windows? Vista+ builtin forfiles ( seems obvious choice for simple tasks, powershell for anything else. – wmz Oct 19 '12 at 10:35
@wmz: its an it as one. – tumchaaditya Oct 19 '12 at 11:31

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 ( seems obvious choice for simple tasks.

(from above ms page, modified)

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .