What is happening behind the scenes when I delete several files on Windows?
Assuming that my code deletes several files in a loop, I guess there should be some kind of optimization to access the MFT. How exacly does this works?
What are the best practices for optimal file deletion?
Deleting massive numbers of files is an infrequent operation on Windows, so it appears there is no support for optimizing this use case. The best you can do is delete all the files individually.