Skip to content

Instantly share code, notes, and snippets.

@dtomic28
Created September 27, 2023 09:50
Show Gist options
  • Select an option

  • Save dtomic28/355fcde17cdb5966e8f1da3bcd1c36e7 to your computer and use it in GitHub Desktop.

Select an option

Save dtomic28/355fcde17cdb5966e8f1da3bcd1c36e7 to your computer and use it in GitHub Desktop.
# Define the root folder name
$rootFolder = "DXEProjects"
# Define the subfolder names
$subfolders = @("Addons", "Assets")
$assetSubfolders = @("Cameras", "Math", "Plugin", "VCs")
# Create the root folder
New-Item -ItemType Directory -Path $rootFolder
# Create subfolders inside the root folder
foreach ($subfolder in $subfolders) {
$subfolderPath = Join-Path -Path $rootFolder -ChildPath $subfolder
New-Item -ItemType Directory -Path $subfolderPath
}
# Create asset subfolders inside the 'Assets' folder
$assetsFolder = Join-Path -Path $rootFolder -ChildPath "Addons"
foreach ($assetSubfolder in $assetSubfolders) {
$assetSubfolderPath = Join-Path -Path $assetsFolder -ChildPath $assetSubfolder
New-Item -ItemType Directory -Path $assetSubfolderPath
}
Write-Host "Folder structure created successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment