powershell - Split-Path

sample code

# ファイル名を取得
PS> Split-Path "D:\xxxx\ps\test.txt" -Leaf      # test.txt

# フォルダ名を取得
PS> Split-Path "D:\xxxx\ps\test.txt" -Parent    # D:\xxxx\ps