Skip to content

Instantly share code, notes, and snippets.

@BradGunnerSGT
Created August 28, 2014 22:04
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 BradGunnerSGT/5ee3039ba28efba38dcb to your computer and use it in GitHub Desktop.
Save BradGunnerSGT/5ee3039ba28efba38dcb to your computer and use it in GitHub Desktop.
list items in powershell older/newer than a certain date
# ls is an alias for get-childitem. get-childitem also take a -recurse and other
# useful params, used to include or exclude file types, etc...
ls file*.txt | Where-Object { $_.LastWriteTime -lt (get-date).AddDays(-3)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment