Windows Utility to search files with certain criteria and act on them

0

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?

pepoluan

Posted 2012-10-19T10:07:32.780

Reputation: 962

1

which version of Windows? Vista+ builtin forfiles (http://technet.microsoft.com/en-us/library/cc753551%28v=ws.10%29.aspx) seems obvious choice for simple tasks, powershell for anything else.

– wmz – 2012-10-19T10:35:07.727

@wmz: its an answer..post it as one. – tumchaaditya – 2012-10-19T11:31:04.937

Answers

1

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.

m4573r

Posted 2012-10-19T10:07:32.780

Reputation: 5 051

0

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

Michael S.

Posted 2012-10-19T10:07:32.780

Reputation: 3 128

0

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.

wmz

Posted 2012-10-19T10:07:32.780

Reputation: 6 132