powershellでファイル分割する
from powershellのTIPS(ファイル結合とか、ファイル操作)
powershellでファイル分割する
code:ファイル分割.ps1
#行数の取得
(Get-Content -Path ファイル名).Length
#繰り返し
$i=0; Get-Content TestFile.txt -ReadCount (分割したい行数) | % {$_ | Out-File "C:\temp\Split\TestFile_$i.txt" -Encoding UTF8 -Append; $i++}
ファイル分割はこれでいけるらしい(上のコマンドの元ネタ)
【PowerShell】大容量テキストファイル分割