![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Get parent directory Hi, how do I get the parent directory of eg. C:\Data\Project1 The input of the program a directory path and Usergroup and then the program should set the permissions for this specfic directory and the "Traverse Folder" persmission for all upper directories. Thanks for any input, Thomas |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Get parent directory PS> (Get-Item C:\windows\system32).parent.fullname C:\windows -- greetings dreeschkind "Thomas Kofler" wrote: > Hi, > > how do I get the parent directory of eg. C:\Data\Project1 > > The input of the program a directory path and Usergroup and then the program > should set the permissions for this specfic directory and the "Traverse > Folder" persmission for all upper directories. > > Thanks for any input, > Thomas > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Get parent directory "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message news:62F0A3CA-3477-481D-94A3-400F91D73C0F@microsoft.com... > PS> (Get-Item C:\windows\system32).parent.fullname > C:\windows And there's also > Get-Item C:\Windows\System32 | Split-Path -parent -- Keith |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Get parent directory Yeah, how could I forget about split-path. It can be even shorter: PS> Split-Path C:\Windows\System32 -parent C:\Windows -- greetings dreeschkind "Keith Hill [MVP]" wrote: > "dreeschkind" <dreeschkind@discussions.microsoft.com> wrote in message > news:62F0A3CA-3477-481D-94A3-400F91D73C0F@microsoft.com... > > PS> (Get-Item C:\windows\system32).parent.fullname > > C:\windows > > And there's also > > > Get-Item C:\Windows\System32 | Split-Path -parent > > -- > Keith > > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Parent Process ID | PowerShell | |||
| Exctracting OU and parent OU name from Active Directory | VB Script | |||
| Collections Help when in a parent class | .NET General | |||