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
- Dyn365GP6 May 2024New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: Use a New Role Center for Collection Management
- Dyn365GP6 May 2024New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: Ensure Accurate Inventory Valuation by Controlling Cost Adjustment
- Dyn365GP3 May 2024New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: See Improved Usability for Warehouse and Inventory
- Dyn365GP3 May 2024New Functionality In Microsoft Dynamics 365 Business Central 2024 Wave 1: Automate the Reminders Process in Collections