forfiles Command Examples

Select files to execute a specified command on. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/forfiles.

forfiles

forfiles /p {{path\to\directory}}

forfiles /c "{{command}}"

forfiles /m {{glob_pattern}}

forfiles /s

forfiles /d +{{5}}