File.replace should throw in case of errors
start Programmer support for windows cmd
start Programmer support of cmd embedded PowerShell