$Sourcedir = "\\TV\storage\NHK高校講座"
$Destinationdir = "\\TV\storage\NHK高校講座"
$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\ffmpeg-20150409-git-df4fca2-win64-static\bin\ffmpeg.exe -i $Source1[$i - 1] -s 720x480 $Destination[$i - 1]
Remove-Item $Source1[$i - 1]
}
Set-Location $Homedir