Solved

Need sub folder path details in the text file -Urgent

Posted on 2013-11-10
4
344 Views
Last Modified: 2013-11-12
There many sub folders and i'm just interested in specific folder and it's sub folder details
Example

Root folder
   - folder1
         -sub-folder 1
                   -interested
                             - Sub folder 1
                             -Sub folder 2
          - Interested
     -Interested
     -Folder2
      -Folder3
     
Now i need "interested "folder and it's sub-folder path details in a text file. How to find it?
0
Comment
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Ram Balachandran
ID: 39637314
This is not a complete solution
PS C:\> Get-ChildItem -Recurse -include users | ?{ $_.PSIsContainer } | Select-O
bject FullName

Open in new window

0
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39637334
This we give only the folder path with interested.It's doesn't give sub folder details.
I manily looking to get the sub folder details.
0
 
LVL 5

Author Comment

by:VIVEKANANDHAN_PERIASAMY
ID: 39637513
Any help is much appreciated.
0
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 39637638
What exactly do you need as "sub folder details"? I take it you mean more than just the paths, because that would be too simple (and ram_kerala's code is a good start):
Get-ChildItem -Recurse C:\ -include Interested | ? { $_.PsIsContainer } |
  Get-ChildItem -Recurse | ? { $_.PsIsContainer }

Open in new window

or, maybe faster
Get-ChildItem -Recurse C:\ |
   ? { $_.FullName -like '*\Interested\*' } |
   ? { $_.PsIsContainer } | select FullName

Open in new window

0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exchange Powershell Help 3 34
Need help in modifying an existing script 2 19
Power Shell CSV operation 8 31
Power shell Script - Help v2 7 20
This article will help you understand what HashTables are and how to use them in PowerShell.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question