Check absolute path in powershell

06/08/2013 14:54

Check if file or folder path is absolute or relative

 

$false

[System.IO.Path]::IsPathRooted("../Folder")

[System.IO.Path]::IsPathRooted("MyFile.xml")

 

$true

[System.IO.Path]::IsPathRooted("C:\MyFile.xml")