Export (0) Print
Expand All
Expand Minimize

Converting the FileSystemObject's FileExists Method

Windows PowerShell

Definition: Returns True if the specified file exists.


This is easy in PowerShell, simply call the Test-Path cmdlet, passing it the name of the file you’re checking for:

Test-Path C:\Scripts\Test.txt

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft