Created
June 22, 2019 00:53
-
-
Save hsimah/69f03a864e8022e8ebf4f2bc2984a667 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Join-Path will handle trailing slashes or lack thereof | |
Join-Path -Path $Branch -ChildPath $Leaf | |
# Other useful functions include: | |
[IO.Path]::GetDirectoryName() # Gets the directory name | |
[IO.Path]::GetFileName() # Gets the file name | |
[IO.Path]::GetFileNameWithoutExtension() # Gets the file name sans extension | |
[IO.Path]::GetExtension() # Gets the file extension including leading . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment