This takes two invocations of Split-Path AFAICT:
PS> Split-Path (Split-Path c:\dir1\dir2\dir3\file.txt -Parent) -Leaf
dir3
This takes two invocations of Split-Path AFAICT:
PS> Split-Path (Split-Path c:\dir1\dir2\dir3\file.txt -Parent) -Leaf
dir3