PowerShell: Join Files
Join 2 Files
# create files New-Item "~/xtest1.txt" -value "aaa" New-Item "~/xtest2.txt" -value "bbb" # join them into xnew.txt Get-Content -Path "~/xtest1.txt", "~/xtest2.txt" | Set-Content -Path "xnew.txt"
Join All Files in a Dir
# join all files in a dir into single file Get-Content "~/web/*" -Filter *html -Raw | Set-Content -NoNewline "~/web/xnew.html"
PowerShell. Working on Files
- PowerShell: Copy File
- PowerShell: Rename File
- PowerShell: Move File
- PowerShell: Delete File
- PowerShell: Create New File
- PowerShell: Create File Symbolic Link, Hard Link, Junction
- PowerShell: Get File Content
- PowerShell: Join Files
- PowerShell: Compare Files (Show Difference)
- PowerShell: Open File by Default App
- PowerShell: File Date Time