title: Locking the file while writing in PowerShell
body: <p>I have a requirement where one process continuously writes to the files in a particular folder. At the same time an another script moves the files from that folder to another folder. But files must not be moved while the first process is in the middle of writing to them. Is there any process/function in PowerShell which can fulfill this requirement?</p>