PowerShell comes with the Split-Path cmdlet, which helps you disassemble paths and find the interesting information. Take a look:
Split-Path c:testfile.txt
Split-Path c:testfile.txt -isAbsolute
Split-Path c:testfile.txt -leaf
Split-Path c:testfile.txt -noQualifier
Split-Path c:testfile.txt -parent
Split-Path c:testfile.txt -qualifier
Split-Path c:testfile.txt -isAbsolute
Split-Path c:testfile.txt -leaf
Split-Path c:testfile.txt -noQualifier
Split-Path c:testfile.txt -parent
Split-Path c:testfile.txt -qualifier