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.
forfiles(technet.microsoft.com/en-us/library/cc753551%28v=ws.10%29.aspx) seems obvious choice for simple tasks,powershellfor anything else. – wmz Oct 19 '12 at 10:35