Removes one or more items from a given path on the filesystem.
Remove-File -Path <String> [-Recurse] [-ContinueOnError <Boolean>] [<CommonParameters>]
Remove-File -LiteralPath [-Recurse] [-ContinueOnError ] []
Removes one or more items from a given path on the filesystem.
-Path <String>
Specifies the path on the filesystem to be resolved. The value of Path will accept wildcards. Will accept an array of values.
-LiteralPath <String>
Specifies the path on the filesystem to be resolved. The value of LiteralPath is used exactly as it is typed; no characters are interpreted as wildcards. Will accept an array of values.
-Recurse [<SwitchParameter>]
Deletes the files in the specified location(s) and in all child items of the location(s).
-ContinueOnError <Boolean>
Continue if an error is encountered. Default is: $true
.
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
-------------------------- EXAMPLE 1 --------------------------
PS C:>Remove-File -Path 'C:\Windows\Downloaded Program Files\Temp.inf'
-------------------------- EXAMPLE 2 --------------------------
PS C:>Remove-File -LiteralPath 'C:\Windows\Downloaded Program Files' -Recurse
To see the examples, type: Get-Help Remove-File -Examples
For more information, type: Get-Help Remove-File -Detailed
For technical information, type: Get-Help Remove-File -Full
For online help, type: Get-Help Remove-File -Online
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。