Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Converting the FileSystemObject's DeleteFile Method

Windows PowerShell

Definition: Deletes one or more files.


See Delete. The only difference is that DeleteFile allows you to delete more than one file at once. You can use the Remove-Item cmdlet to delete multiple files. For example, you can use wildcards to delete all the .txt files from a folder:

Remove-Item C:\scripts\temp2\*.txt
del C:\scripts\temp2\*.txt

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.