Skip to content

Instantly share code, notes, and snippets.

@DaaaaanB
Created April 15, 2020 19:17
Show Gist options
  • Save DaaaaanB/942176fdf9b6133f17eb5e74f26bffa9 to your computer and use it in GitHub Desktop.
Save DaaaaanB/942176fdf9b6133f17eb5e74f26bffa9 to your computer and use it in GitHub Desktop.
Powershell script to automate the creation of a project.
param (
#Take in a string as the desired path and name for the directory
[string]$path
)
# Pipe anything you don't want printed to the shell into Out-Null
# Create the directoies:
New-Item $path -ItemType Directory | Out-Null
New-Item $path/src/ -ItemType Directory | Out-Null
New-Item $path/bin/ -ItemType Directory | Out-Null
#Create desired files in those directories
New-Item $path/bin/build.ps1 | Out-Null
New-Item $path/README.md | Out-Null
#cd into the new directory
Set-Location $path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment