web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

PowerShell Snippets: Delete File

Ian Grieve Profile Picture Ian Grieve 22,784
PowerShellThis 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
}

Read original post PowerShell Snippets: Delete File at azurecurve|Ramblings of an IT Professional


This was originally posted here.

Comments

*This post is locked for comments