PowerShell - File and Directory Operations
Find the error in this code:
$exists = Test-Path 'C:\Temp\data.txt'
if $exists {
Write-Output 'File found'
}$exists = Test-Path 'C:\Temp\data.txt'
if $exists {
Write-Output 'File found'
}if $exists { ... } without parentheses, which is a syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions