A quick post to note down a script that’ll create a folder if it doesn’t already exist in PowerShell.
This script utilises Test-Path which helps determin whether a path exists.
# create folder if not exists $path = "c:\temp\" If(!(test-path $path)) { New-Item -ItemType Directory -Force -Path $path }

0 Comments