Link to home
Start Free TrialLog in
Avatar of bbimis
bbimis

asked on

tree to excel

I am trying to capture all the directories (NAMES ONLY, and subdirectories) on a given network share.  I know i can do powershell and Get-ChildItem | tree > c:\tree.txt    but can someone help me get it so i can import it into excel in a nice layout so we can use it as a checklist?
Thanks!
Avatar of SubSun
SubSun
Flag of India image

Check the csv report format from following question and see if it works for you..
https://www.experts-exchange.com/questions/28212659/How-to-create-a-report-of-files-and-folder-sizes-from-a-certain-path.html
Avatar of bbimis
bbimis

ASKER

that looks great. I have one question though and I have no problem opening a new question if need be.  Here is ultimately what I need to figure out.

lets say i have
f:\common
apples
oranges
grapes

and they have files inside of them I want for each directory a csv file of all its file permissions
I have a powershell script that will do the WHOLE thing but i want it to go to one directory say apples and make a csv file called apples.csv  then when it finishes move on an make a csv file called oranges and so on.  Is this possible and if so can someone help me with the code.  this is what i have so far.

$path = 'F:\common’

$outFilename = Join-Path $path "Dir-$(Get-Date -Format 'yyyyMMdd-HHmmss').csv"

dir $path -attr !D -r | select Name, Extension, DirectoryName, Length, CreationTime, LastAccessTime, LastWriteTime | export-csv $outFilename -NoTypeInformation

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bbimis

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for bbimis's comment #a39445574
Assisted answer: 500 points for Subsun's comment #a39445462

for the following reason:

thank you so much that is exactly what i needed!!!!
Avatar of bbimis

ASKER

THANK YOU SO MUCH!!! This is what i needed!