Hello all,
I've got a script that has a While statement an example of it is:
While (1 -eq 1) {
If (Test-Path -path 'C:\My\Path)
{ break }
start-sleep -Seconds 5
}
This works well and does its job...my question is (I'm sure you can guess) how can I use a loop in a more intelligent way so that I dont run the risk of it running forever if the condition isn't met?
Many thanks for any guidance.
Carl
Carl Barrett | Twitter: @Mosquat