Skip to content

Instantly share code, notes, and snippets.

@JassonCordones
Last active October 7, 2025 12:25
Show Gist options
  • Select an option

  • Save JassonCordones/ba2d5b85494a72c9b285425a2e8cb8d9 to your computer and use it in GitHub Desktop.

Select an option

Save JassonCordones/ba2d5b85494a72c9b285425a2e8cb8d9 to your computer and use it in GitHub Desktop.
Print contents of a directory
$targetDir = ""
Get-ChildItem -Path $targetDir -Recurse -File | ForEach-Object {
$parent = $_.Directory.Name
$name = $_.Name
Write-Output "`n=== $parent\$name ==="
Get-Content -Path $_.FullName -Raw
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment