While the exact culprit behind an affected user’s File Explorer crashing while scanning a directory for files is yet to be found, a solution has thankfully been uncovered. For some reason, simply running Windows 10’s built-in disk cleaning utility – Disk Cleanup – on an affected user’s C drive fixes the problem. Disk Cleanup is a built-in Windows 10 utility that scans partitions for everything from temporary files to lingering settings files and then allows the user to get rid of whatever data they think they no longer need. If your computer’s File Explorer crashes while scanning a directory for files/folders, here’s how you can run Disk Cleanup on your computer’s C drive and resolve this problem. Open the Start Menu. Search for “disk cleanup”. Click on the search result titled Disk Cleanup to launch the utility. Disk Cleanup will, as soon as it is launched, begin searching your computer’s C drive for all data that you could get rid of to free up space. Let it do so. Once your C drive has been scanned completely, you will be presented with a list of all the files that your computer will benefit from the deletion of, along with the amount of space on your computer’s C drive that each type of files occupies. Make sure that you select each and every single one of these files by checking the boxes beside them, and then click on OK. All of the selected files will be deleted.

Once all of the selected files have been deleted, your File Explorer should no longer crash when it scans a directory on your computer for files and folders.

Resetting Netsh and Winsock

It is possible that certain internet configurations have been corrupted and are interfering with certain elements of the File Explorer due to which it is crashing. Therefore, it is recommended to reset these through the command prompt. For that:

FIX: Windows 11 File Explorer Crashes on Right ClickFix: Shockwave Flash Crashes in Chrome Windows 10How to Fix Rocket League Crashes and Freezes on Windows 7, 8 and 10How to Fix Windows 10 Freezes & Crashes after Anniversary Update FIX  File Explorer Crashes on Windows 10 - 39