1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 12:02:08 +02:00
tldr/pages/windows/forfiles.md
Emily Grace Seville c52cc074d9
windows/*.md: make placeholders more compatible with CLIP ones (#9872)
* Make placeholders more compatible with CLIP ones

* Update pages/windows/doskey.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages/windows/doskey.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

---------

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
2023-02-20 15:23:49 +08:00

583 B

forfiles

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

  • Search for files in the current directory:

forfiles

  • Search for files in a specific directory:

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

  • Run the specified command for each file:

forfiles /c "{{command}}"

  • Search for files using a specific glob mask:

forfiles /m {{glob_pattern}}

  • Search for files recursively:

forfiles /s

  • Search for files older than 5 days:

forfiles /d +{{5}}