$a=Get-Item ($folder+"\/"+$name)
switch ($a.Extension)
{
'.mp3' {Write-Host "AudioFile"; Copy-Item $a.FullName -Destination d:\test\Audio}
'.txt' {Write-Host "TextFile"; Copy-Item $a.FullName -Destination d:\test\Text}
'.bat' {Write-Host "batchfile"}
}