Forrest logo
back to the forfiles tool

forfiles:tldr:9b1a1

forfiles: Search for files older than 5 days.
$ forfiles /d +${5}
try on your machine

The command "forfiles /d +${5}" is used in the Windows Command Prompt or PowerShell to execute a command on files or directories based on their date modified.

Here's an explanation of each part of the command:

  • "forfiles": This is the command that allows us to run a command on desired files or directories.
  • "/d": This is an option used to specify that we want to filter the files based on their date modified.
  • "+${5}": This is the value passed to the "/d" option, which determines the duration from the current date. "${5}" refers to the fifth command line argument provided, representing a number of days.

So, when you run this command, it will execute another command on files or directories modified more than ${5} days ago. The specific action or command to execute alongside this forfiles command would be included separately.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the forfiles tool