reduce2.ps1
$Sourcedir = "\\TV\storage\BS世界のドキュメンタリー"
$Destinationdir = "\\TV\storage\BS世界のドキュメンタリー"
$Star = "*"
$Homedir = "~"
Set-Location $Sourcedir
Get-ChildItem | Where-Object {$_.Name -match "^[^$Star]"} | Format-List -property name > temp.txt
$Source0 = Get-Content temp.txt | Where-Object {$_.trim()}
$Source1 = New-Object object[] $Source0.Length
$Destination = New-Object object[] $Source0.Length
for ( $i = 1; $i -le $Source0.Length; $i++ )
{
$Source1[$i - 1] = $Source0[$i - 1] -replace "Name : ", ""
$Destination[$i - 1] = $Star + $Source1[$i - 1]
C:\Users\kanayaj\Downloads\ffmpeg-20160330-git-be746ae-win64-static\ffmpeg-20160330-git-be746ae-win64-static\bin\ffmpeg.exe -i $Source1[$i - 1] -filter_complex channelsplit=channel_layout=stereo -s 1280x720 $Destination[$i - 1]
Remove-Item $Source1[$i - 1]
}
Set-Location $Homedir