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!
Thanks!
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.
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!!!!
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!!!!
ASKER
THANK YOU SO MUCH!!! This is what i needed!
https://www.experts-exchange.com/questions/28212659/How-to-create-a-report-of-files-and-folder-sizes-from-a-certain-path.html