Skip to content

Instantly share code, notes, and snippets.

@oliverlabs
Created September 27, 2023 14:56
Show Gist options
  • Save oliverlabs/9c906167b0ec2c9c13e17ef741d1e3ae to your computer and use it in GitHub Desktop.
Save oliverlabs/9c906167b0ec2c9c13e17ef741d1e3ae to your computer and use it in GitHub Desktop.
This function creates a folder and performs a cd operation into it with one command
# This function creates a folder and cd into it
function mcd {
param (
[Parameter(Mandatory = $true)]
[string]$folderName
)
New-Item -ItemType Directory -Force -Path $folderName
Set-Location -Path $folderName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment