Skip to content

Instantly share code, notes, and snippets.

@alessandromarchetti
Last active November 4, 2019 08:38
Show Gist options
  • Save alessandromarchetti/92eedfe58517b46dc4057807bd1f0ea6 to your computer and use it in GitHub Desktop.
Save alessandromarchetti/92eedfe58517b46dc4057807bd1f0ea6 to your computer and use it in GitHub Desktop.
Windows CMD Cheatsheet

Search for files created after a certain date

forfiles /P <directory> /S /D +<date> [/c "cmd /cecho @path"]

/S if for recursively search in subfolders of

Examples

**If today is 11/07/2019 look for files in the last 7 days from cur folder is: ** forfiles /P . /S /D +11/01/2019 /c "cmd /c echo @fdate @ftime @path" (by default it only prints filenames, the /c part tells it to print full paths)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment