Check if file exist and do something

PHOTO EMBED

Tue Mar 09 2021 09:15:40 GMT+0000 (UTC)

Saved by @vbesse

$fileToCheck = "C:\tmp\test.txt"
if (Test-Path $fileToCheck -PathType leaf)
{
    #do some stuff
}
content_copyCOPY

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