This post is part of the series on PowerShell Snippets.
The following PowerShell command will check if the named file exists in the current directory and, if so, delete it (replace the highlighted section with the name of the file to be deleted):
$FileName = "azrcrv-smtp.zip"
if (Test-Path $FileName) {
Remove-Item $FileName
}
Continue Reading azurecurve’s Article on their blog
PowerShell Snippets: Delete File
This post is part of the series on PowerShell Snippets.
Blog Syndicated with azurecurve’s Permission
More About This Author
Array
- Dyn365GP26 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Restore an Environment to a Point in Time
- Dyn365GP25 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Restore a Deleted Environment
- Dyn365GP24 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Delete an Environment
- Dyn365GP23 April 2024In Microsoft Dynamics 365 Business Central (Administration), how do I… Delete a Company