不用想 数组分割 PS法- $title = 'T1;T2;T3;T4;T5;T6;T7;T8;T9;T10;T11;T12';
- $Vol = 1,2,3,4,5,161,181,191,201,202,211,212; #可修改要取值的列。
- sc '.\xxx.csv' -value $title -force;
- $index = @( $Vol | %{ $_ -1 });
- ls '*.txt' | %{ $F=(gc $_).Split(';');ac '.\xxx.csv' -value $($F[$index] -join';')}
复制代码
|