Get-ChildItem.Length is Wrong

后端 未结 2 1068
生来不讨喜
生来不讨喜 2020-11-28 15:21

I am writing a recursive function that goes through a directory and copies every file and folder in it. The first check I have in the function is to see if the path passed i

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 16:10

    Try $pathChildren.Count instead of $pathChildren.Length - that will return the number of items in the array.

提交回复
热议问题