memo code7

完全自分用のPowerShellのメモです。
間違いだらけのコードなのでマネしないでください。

$PATHs = $Args
$filename = Split-Path $PATHs -Leaf
Import-Csv $Args -Encoding Default -Delimiter "`t" -Header (0..28) | Select-Object "0","1","4","5","16","17","18","19","21" `
 | Export-Csv -Path C:\Users\<User>\Desktop\After_$filename.csv -Encoding Default

デリミタでタブを指定
-Delimiter “`t”

ヘッダー情報を0から28までで指定
-Header (0..28)

エクスポート先の<User>は任意の情報を記入または、別の任意のフォルダーを選択

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny

PAGE TOP