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
答案 0 :(得分:0)
简短回答:否
更长的答案:不,不是。
Get-ChildItem
不会锁定文件。如果您使用Get-Content
或Get-ChildItem
脚本中的类似内容,则它可能会锁定