# This clears the FTP inbox and outbox folders on the host running it. The script will delete itself afterward as part of the cleanup. # This should ideally be run a day or two after a Bp Drug Update to clear out the leftover .exe files, as server storage # space is usually very limited. $inboxPath = "C:\Myhealth FTP\FTP Inbox\*" $outboxPath = "C:\Myhealth FTP\FTP Outbox\*" Write-Host ("Deleting file(s) matching path `"" + $outboxPath + "`"...") Start-Sleep 1 Remove-Item -Path $outboxPath -Recurse Write-Host "Done!" Start-Sleep 1 Write-Host ("Deleting file(s) matching path `"" + $inboxPath + "`"...") Start-Sleep 1 Remove-Item -Path $inboxPath -Recurse Write-Host "Done!" Start-Sleep 1 Write-Host "This script will now self-destruct." Remove-Item -LiteralPath $MyInvocation.MyCommand.Source -Force Start-Sleep 1 Write-Host "Closing window in 5 seconds..." Start-Sleep 5