Hey,
I have a powershell script where I first use Get-childitem to receive a number of files.
Then I do some stuff with it and try to move the file afterwards.
Unfortunately if I am using a lot of files I receive very often the error:
The process cannot access the file because it is being used by another process.
Even -Force parameter does not help further.
Based on my look around it is not used by another process.
I think it is still 'in use' by powershell from script commands previously.
Is there any way to 'see' if the file is still in use currently and wait for this to end?
Or can I 'close' the current usage of the file?
Thank you :)