Skip to content

Instantly share code, notes, and snippets.

@pranavmishra90
Created October 3, 2022 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pranavmishra90/93687431d5c2bdb3490e752cf7316743 to your computer and use it in GitHub Desktop.
Save pranavmishra90/93687431d5c2bdb3490e752cf7316743 to your computer and use it in GitHub Desktop.
PowerShell - Recursively list files and sort by date modified
# Use the following snippet of code in a directory to list files, recursively, and then sort them by date modified.
gci -file -recurse | select LastWriteTime, Fullname | sort lastwritetime -Descending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment