Try to empty the temp data folder and Recycle Bin firstly.
In the Windows search box type %temp% and press Enter. You will be taken to the C:\Users\username\AppData\Local\Temp folder. Delete all the files in this folder.
Besides, use Process Explorer, when you right-click, you also have the ability to Kill Process Tree, which will also close any other associated processes. Now try to copy or move the folder or file that was giving you an error.
Get Process Explorer from here:
https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer
-------------------------------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.