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
Dyn365GP2023.03.23New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 1: Set Default Dimensions on Locations, Inventory Documents and Journals
Dyn365GP2023.03.22New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 1: Easier to Create Opening Balances for Item Tracked Inventory
Dyn365GP2023.03.22New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 1: Demo Tool and Data for Warehouse and Inventory Scenarios
Dyn365GP2023.03.21New Functionality In Microsoft Dynamics 365 Business Central 2023 Wave 1: Catalog Items Use Standard Number Series, Can Include in Blanket Sales Orders