Skip to content

Instantly share code, notes, and snippets.

@TheGU
Created January 15, 2025 02:19
Show Gist options
  • Save TheGU/70030da5e6bd19d552b308109ebf9c8c to your computer and use it in GitHub Desktop.
Save TheGU/70030da5e6bd19d552b308109ebf9c8c to your computer and use it in GitHub Desktop.
Powershell command to flatten file of specific ext. from sub folder
$targetDir = Convert-Path '.'
$targetExt = '*.ttf'
Get-ChildItem -LiteralPath $targetDir -Directory | Get-ChildItem -Recurse -File -Filter $targetExt | Move-Item -Destination $targetDir -Whatif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment