保存成bat,大概可以- #ANSI&cls&powershell -NoProfile -NoLogo "gc '%~0'|out-string|iex"&pause&exit
- $x = [xml](gc a.xml)
- $x.SelectNodes("//item") | %{
- $id = $_.id
- $_.SelectNodes("./extract") | %{
- ($id, $_.id, $_.quantity, $_.chance) -join ","
- }
- } | Out-File -Encoding oem a.csv
复制代码
|