今天我在Windows PowerShell中启动脚本 - 所以请原谅我的“哑” ...的PowerShell:子目录上市到一个txt文件
我想创建TXT的文件,每个文件的子文件夹的名称“根文件夹“在驱动器G:上。在G:\我有以下文件夹:
1_data
2_IT_area
3_personal
4_apprenticeship
7_backup
8_archives
9_user_profile
所以我写这个剧本:
get-childitem G:\ | ForEach-Object -process {gci $_.fullName -R} | WHERE {$_.PSIsContainer} > T:\listing\fileListing+$_.Name+.txt
但脚本没有做我所做的事情nt - 它只创建一个文本文件..你能帮助我吗?我已经尝试过这里所描述的>>http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/“T:\ listing \ $ _.Name.txt” - 不起作用...
非常感谢您的帮助!
-Patrick
非常感谢! - 超精确地解释:)非常感谢! – 2010-10-19 15:51:21