Hello! Today I started scripting in Windows PowerShell - so please excuse my "dumbness"...
I want to create txt-Files with the name of the subfolders of each "rootfolder" on drive G:. On G:\ I have the following folders:
1_data
2_IT_area
3_personal
4_apprenticeship
7_backup
8_archives
9_user_profile
So I wrote this script:
get-childitem G:\ | ForEach-Object -process {gci $_.fullName -R} | WHERE {$_.PSIsContainer} > T:\listing\fileListing+$_.Name+.txt
But the script isn't doing what I want - it's creating only one text file.. can u help me? I already tried it as described here >> http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/ "T:\listing\$_.Name.txt" - doesn't work as well...
Thank u very much for your Help!
-Patrick