Test if our file exists and delete if true.
$FileName = "C:\Path\somefile.txt" if (Test-Path $FileName) { Remove-Item $FileName }
Donate by bitcoin: 12E1LyKb9Wwzw3iy6V4oWpHDXkTRC6UHJ9
Test if our file exists and delete if true.
$FileName = "C:\Path\somefile.txt" if (Test-Path $FileName) { Remove-Item $FileName }