Skip to content

Instantly share code, notes, and snippets.

@davewilson
Last active August 29, 2015 14:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davewilson/bd0ebe5dbdea050e7b1f to your computer and use it in GitHub Desktop.
Save davewilson/bd0ebe5dbdea050e7b1f to your computer and use it in GitHub Desktop.
Useful Path Manipulation Shortcuts
#http://powershell.com/cs/blogs/tips/archive/2014/09/08/useful-path-manipulation-shortcuts.aspx
[System.IO.Path]::GetFileNameWithoutExtension('file.ps1')
[System.IO.Path]::GetExtension('file.ps1')
[System.IO.Path]::ChangeExtension('file.ps1', '.copy.ps1')
[System.IO.Path]::GetFileNameWithoutExtension('c:\test\file.ps1')
[System.IO.Path]::GetExtension('c:\test\file.ps1')
[System.IO.Path]::ChangeExtension('c:\test\file.ps1', '.bak')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment