$f = "c:\temp\foo.txt" Split-Path $f -Leaf -> "foo.txt" Split-Path $f -Extension -> ".txt" (with the "." to be compatible with dir) Split-Path $f -LeafBase -> "foo"
$f = "c:\temp\foo.txt"
Split-Path $f -Leaf -> "foo.txt"
Split-Path $f -Extension -> ".txt" (with the "." to be compatible with dir)
Split-Path $f -LeafBase -> "foo"