locked
Unzipping files and trying to move-item. Files are locked RRS feed

  • Question

  • Hi All,

     I am using Get-ChildItem and pipeing that to Expand-Archive to unzip a few zip files. This part is working.

    However, I would like to move-item to another directory. When I try to do this, I get a access to path denied due to a file lock.

    I tried to do a Start-Sleep thinking it was a timing issue with the file not fully created. I now think that the unzipped PDF and xlsx files are just locked and that is why I cannot move them. 

    Any nudge in the right direction would be very appreciated.

    Best.

    Saturday, March 28, 2020 4:03 AM

All replies

  • My crystal ball is currently undergoing maintenance. So you need to show us your code so we can try to help you. ;-)  Please format it as code: How to Use the Code Feature in a TechNet Forum Post

    Live long and prosper!

    (79,108,97,102|%{[char]$_})-join''

    Saturday, March 28, 2020 4:09 AM
  • Hi,

    Thank you for posting in our TechNet forum.

    Maybe you can show your code so that we can find the errors or fill in the loopholes, that is the way to help you so far.

    Best wishes,

    Young Yang.

    Tuesday, March 31, 2020 5:37 AM