mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-14 14:59:43 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
33
tldr/windows/forfiles
Normal file
33
tldr/windows/forfiles
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# forfiles
|
||||
|
||||
> Select 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 o\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}}`
|
||||
Reference in New Issue
Block a user