I've a really simple problem, but i dont get it working. I have a loop which checks if one of two possible files is existing, if not then sleep and check again in two seconds.
while (([System.IO.File]::Exists($terminationFile) -ne $true) -or ([System.IO.File]::Exists($noFile) -ne $true)) {
# wait 2 seconds and check again
Start-Sleep -s 2
}
If I check both conditions in the same loop it checks only the first one.
Would be great if anybody can help
Regards, Justin