Skip to content

Instantly share code, notes, and snippets.

@jesserobertson
Last active January 23, 2020 00:31
Show Gist options
  • Save jesserobertson/65d978a52b2f9554af8f1095166faf6a to your computer and use it in GitHub Desktop.
Save jesserobertson/65d978a52b2f9554af8f1095166faf6a to your computer and use it in GitHub Desktop.
Copy all PDFs recursively from a parent folder to the current folder in Powershell
# $data_dir is some gnarly collection of folders
Get-ChildItem -Recurse $data_dir |
Where-Object { $_.Extension -eq '.pdf' } |
Copy-Item -Destination .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment