ForFiles is a command-line tool for selecting files for batch processing.
ForFiles enables you to run a command on/pass arguments to multiple files. It is simpler to use than the FOR command.
The syntax is:
ForFiles \[-ppath\] \[-msearchmask\] \[-ccommand\] \[-dddmmyy\] \[-s\] \[-v\] \[-?\]
|-ppath||is the path to start searching.|
|-msearchmask||is the seach mask, where *.* is the default.|
|-ccommand||is a command to execute on each file. the default command is "cmd /c echo @file". Other variables are @path and @relpath|
|-dddmmyy||Files with a date >= ddmmyy are selected.|
|-s||Sub-directories are processed.|
|-v||Verbose output is selected.|
ForFiles -pc:\ -s -m*.bat -c"cmd /c echo @file is a batch file"