So I have encountered this problem and successfully recreated it numerous times.
The problem is simple: whenever using any software other than explorer, to delete/move/copy/rename... contents of a any folder, if that folder is opened in explorer while the operation is running, explorer will instantly use up 100% CPU to refresh the folder, and slow down the operation, and cause my computer to become very irresponsive(not freezed), and keep doing so until either the operation has ended or the folder is closed in explorer...
So is this the normal behavior of Windows? Is this a bug? How can I fix(or improve) this? I am using Windows 10 20H2 x64 if that helps.
Edit: I can confirm there are no system file corruptions, I have run DISM and SFC numerous times and they can't fix this issue, they fail to detect any problem. Also I had just reinstalled Windows very recently. I have also run many hard disk utilities to check if hard drives have any bad sectors, and there is none. And I have also run chkdsk numerous times and no filesystem corruptions. So they are not the case.
Example: Try this in PowerShell, it should recreate the problem described, use at your own risk.
$test=[string]"C:\test"+$(get-random)
md $test
explorer $test
taskmgr
0..10000 | % {ni "${test}\${_}.txt"|out-null}
(gci $test).fullname | %{ri $_}
rd $test
P.S. If it really succeeded recreating the problem described, just restart explorer, and let PowerShell do its job, don't close PowerShell before it completes deletion, because explorer deletion speed is lower than PowerShell(maybe)(because explorer will compute number of files and ETA before deletion, the script finds one and deletes one)
Edit:
I use PowerShell 7.1 and
gci $test | %{ri $_}
works fine, but it might not work on lower versions of PowerShell, So I generalized it, now lower versions of powershell can find the paths.
Proof:
If the files were not deleted first, removing the folder will cause it prompt the warning Recurse parameter not specified and asking for confirmation.
Context Menus:
Desktop:
Explorer(not "This PC"):
"This PC"
"New"
My hard drives are Hard Disk Devices, I guess you people are all using Solid State Drives? You are so rich...
C:\test987554766
with 10000 files, then fails with many messages likeri : Cannot find path 'C:\Temp\265.txt' because it does not exist.
until it stops. No excessive CPU utilization.