Created
August 14, 2019 21:17
-
-
Save Windos/b71163278b287a124ac29f96eb0df0e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Files = Get-ChildItem -Path 'C:\Temp' -Filter "*.tsv" -Recurse | |
$Directories = $Files | Group-Object -Property 'DirectoryName' | |
foreach ($Directory in $Directories) { | |
$Outfile = Join-Path -Path $Directory.Name -ChildPath '\HTML-File-Name.html' | |
# Start your HTML file here, add CSS or headings. | |
foreach ($File in $Directory.Group) { | |
Import-Csv -Delimiter "`t" -Path $File.FillName | ConvertTo-Html | Out-File -FilePath $Outfile -Append | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment