mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-05 01:35:32 +02:00
forfiles: add page
This commit is contained in:
parent
e419ecd71a
commit
055b3f63be
1 changed files with 27 additions and 0 deletions
27
pages/windows/forfiles.md
Normal file
27
pages/windows/forfiles.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# forfiles
|
||||||
|
|
||||||
|
> Select one or more files to execute a specified command on.
|
||||||
|
|
||||||
|
- 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 with a last-modified date greater than 5 days old:
|
||||||
|
|
||||||
|
`forfiles /d {{+5}}`
|
Loading…
Add table
Reference in a new issue