I have an absolute path in a variable in my powershell 2.0 script. I want to strip off the extension but keep the full path and file name. Easiest way to do that?
So
Here is the best way I prefer AND other examples: $FileNamePath (Get-Item $FileNamePath ).Extension (Get-Item $FileNamePath ).Basename (Get-Item $FileNamePath ).Name (Get-Item $FileNamePath ).DirectoryName (Get-Item $FileNamePath ).FullName
$FileNamePath (Get-Item $FileNamePath ).Extension (Get-Item $FileNamePath ).Basename (Get-Item $FileNamePath ).Name (Get-Item $FileNamePath ).DirectoryName (Get-Item $FileNamePath ).FullName