遍历文件夹及子文件夹_函数
$CurrentFolder = "E:\Temp\jj"
Function GetSubFolder ($CurrentFolder)
{
$items = Get-ChildItem -Path $CurrentFolder
Foreach ($item in $items)
{
If ($item.Mode -eq "d----")
{GetSubFolder $item.pspath}
Else {
$item.Name
$item.psparentpath
}
}
}
GetSubFolder $CurrentFolder