Solved

Need sub folder path details in the text file -Urgent

Posted on 2013-11-10
4
341 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 68

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
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 the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now