PowerTip: Find if Folder Exists

Doctor Scripto

Dr Scripto

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


Comments are closed. Login to edit/delete your existing comments