$path = ‘c:\datasource’

$items = Get-ChildItem -Path $path -Filter ‘&.*’ -Recurse

foreach ($item in $items)
{
try
{
$item.Name
Rename-Item -Path $item.FullName -NewName $item.Name.Replace(‘&’,’_’)

    $output = "Amended '" +  $item.Name + "' to '" + $item.Name.Replace('&','_') + "'"
    Write-Host $output
}
catch
{
    $output = "Could not rename file '" +  $item.Name + "'"
    Write-Host $output
}

}

$items = Get-ChildItem -Path $path -Filter ‘~.‘ -Recurse

foreach ($item in $items)
{
try
{
$item.Name
Rename-Item -Path $item.FullName -NewName $item.Name.Replace(‘~’,’_’)

    $output = "Amended '" +  $item.Name + "' to '" + $item.Name.Replace('~','_') + "'"
    Write-Host $output
}
catch
{
    $output = "Could not rename file '" +  $item.Name + "'"
    Write-Host $output
}

}