Created
September 27, 2023 14:56
-
-
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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