回复 16# 5i365 - #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
- $d="abc.csv"
- $a=type $d
- $b=2
- [int]$c=$a.count/$b
- for($i=1;$i -lt $a.count;$i+=$c){
- sc ("{0}-{1}.csv" -f ($a[$i] -replace '^(\d+),.*','$1'),($a[$i..($i+$c-1)][-1] -replace '^(\d+),.*','$1')) ($a[0],$a[$i..($i+$c-1)])
- }
复制代码
|