Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need sub folder path details in the text file -Urgent

Posted on 2013-11-10
4
Medium Priority
?
356 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 71

Accepted Solution

by:
Qlemo earned 2000 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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

719 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