$pluginName = Split-Path -Path (Get-Location) -Leaf; $MFolder = "..\..\build\$pluginName" $source = "..\..\build\$pluginName\source" if (Test-Path -Path $MFolder) { "Path exists!" } else { New-Item -ItemType directory -path $MFolder } if (Test-Path -Path $source) { "Path exists!" } else { New-Item -ItemType directory -path $source } Copy-Item -Path "*" -Destination $source -Recurse -Exclude "*prepros.config" -Force