![]() ![]() Example 5: Change location to a specified path PS C:\> Set-Location (Split-Path -Path $profile) ![]() Relative to the current folder, which is represented by a dot (. This command determines whether the path is relative or absolute. Example 4: Determines whether a path is absolute Split-Path -Path ".\My Pictures\*.jpg" -IsAbsolute Parameters to specify the split, Split-Path uses the split location default, which is Parent. This command returns only the parent containers of the path. Example 3: Get the parent container Split-Path -Path "C:\WINDOWS\system32\WindowsPowerShell\V1.0\about_*.txt"Ĭ:\WINDOWS\system32\WindowsPowerShell\V1.0 ![]() Like all Split-Path commands, this command returns strings. The Resolve parameter tells Split-Path to display the items that the split path references, The last item, also known as the leaf, the command displays only the file names. This command displays the files that are referenced by the split path. Example 2: Display file names Split-Path -Path "C:\Test\Logs\*.log" -Leaf -Resolve This command returns only the qualifier of the path. Examples Example 1: Get the qualifier of a path Split-Path -Path "HKCU:\Software\Microsoft" -Qualifier You can use this cmdlet to get or submit only a selected part of a path. Whether the path is relative or absolute. It can also get items that are referenced by the split path and tell The Split-Path cmdlet returns only the specified part of a path, such as the parent folder, a ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |