- フルパスで出力
$ ls -r -Name
test\hoge1
test\hoge2
- フォルダ単位でセパレート
- 半角¥を,に置換して出力
- ファイル名だけ拾いたい場合に使う (CSVエディタで開いて列を選択してコピペ)
$ ls -r -Name | %{$_ -replace '\\',','};
test,hoge1
test,hoge2
$ ls -r -Name
test\hoge1
test\hoge2
$ ls -r -Name | %{$_ -replace '\\',','};
test,hoge1
test,hoge2