private775 icon

PowerShell: remove a folder if exists and create a new one

private775 | PRO | 04/22/15 02:33:42 PM UTC | 0 ⭐ | 856 👁️ | Never ⏰ | []
PowerShell |

170 B

|

None

|

0 👍

/

0 👎

$outDir = "c:\temp\XML"
 
If (Test-Path $outDir){
    Remove-Item $outDir -Verbose -Confirm:$false -Recurse
}
[void](New-Item -Path "$($outDir)" -ItemType "directory" -Verbose)

Comments