Delete file if it exist

PHOTO EMBED

Tue Mar 09 2021 09:16:20 GMT+0000 (Coordinated Universal Time)

Saved by @vbesse

$fileToCheck = "C:\tmp\test.txt"
if (Test-Path $fileToCheck -PathType leaf)
{
    Remove-Item $fileToCheck
}
content_copyCOPY

https://www.tachytelic.net/2019/05/check-file-exists-powershell/