Does get-childitem lock the folders while fetching files to the last level

时间:2018-07-25 04:54:21

标签: powershell get-childitem

I am trying to read the last leaf based on the lastwritetime in a given folder using get-childitem. Simultaneously few files are getting copied to the same folder. Will this reading the files affect the copy? Does the get-childitem lock the root folder while finding the last leaf and prevent the copy of new files into the folder.

Any insight on this is highly helpful.

Regards Dinesh

1 个答案:

答案 0 :(得分:0)

简短回答:否

更长的答案:不,不是。

Get-ChildItem不会锁定文件。如果您使用Get-ContentGet-ChildItem脚本中的类似内容,则它可能会锁定