Converting the FileSystemObject's FolderExists Method

Windows PowerShell

Definition: Returns True if the specified folder exists.


To do this in PowerShell, simply pass the folder you’re checking for to the Test-Path cmdlet:

Test-Path C:\Scripts

See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page