Если под данный конкретный случай, то что-то типа такого
$destinationDir = "D:\"
$mainDir = "new_project"
$subDirs = @("css", "js")
$files = @("index.html", "style.css", "script.js", "script.min.js")
Foreach ($subDir in $subDirs)
{
if (!(Test-Path -Path "$destinationDir/$mainDir/$subDir"))
{
New-Item -Path "$destinationDir/$mainDir/$subDir" -ItemType Directory
}
Foreach ($file in $files)
{
if ($file -match ".$subDir")
{
if (!(Test-Path -Path "$destinationDir/$mainDir/$subDir/$file"))
{
New-Item -Path "$destinationDir/$mainDir/$subDir/$file" -ItemType File
}
}
elseif ($file -match ".html")
{
if (!(Test-Path -Path "$destinationDir/$mainDir/$file"))
{
New-Item -Path "$destinationDir/$mainDir/$file" -ItemType File
}
}
}
}