Using Simple Path Functions

PowerShell comes with the Split-Path cmdlet, which helps you disassemble paths and find the interesting information. Take a look:

Split-Path c:\test\file.txt
Split-Path c:\test\file.txt -isAbsolute
Split-Path c:\test\file.txt -leaf
Split-Path c:\test\file.txt -noQualifier
Split-Path c:\test\file.txt -parent
Split-Path c:\test\file.txt -qualifier

Posted Jun 11 2009, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.