Collecting Interest on Technical Debt
Thursday, April 22, 2010
Powershell Script to Read and Write a File
Powershell Script to Read and Write a File
function Copy-File ($infile, $outfile)
{
$file = gc $infile
Clear-Content $outfile
foreach( $line in $file)
{
$line | Out-File -filepath $outfile -encoding utf8 -append
}
}
Copy-File infile.txt outfile.txt
No comments:
Post a Comment
Newer Post
Older Post
Home
No comments:
Post a Comment