PowerTip: Find if Folder Exists

The Scripting Guys

Dr

Summary: Use Windows PowerShell to see if a folder exists.

Hey, Scripting Guy! Question How can I easily find if a folder exists for a Windows PowerShell script that I am writing?

Hey, Scripting Guy! Answer Use the Test-Path cmdlet and the PathType parameter, for example:

Test-Path c:\fso -PathType Container

The Scripting Guys
Dr Scripto

Follow Dr   

No Comments.