C# Cannot delete folder contains PDF or DOC files : <p>I have an issue that has just happened yesterday. Before, I use <code>Directory.Delete(path, true)</code> to delete all files and subfolders and it worked correctly.</p>

<p>But now, when I run my program run to this method, if the folder contains PDF or DOC files, these files cannot be deleted and even the EXE file of my program is deleted. It is so weird.</p>

<p>If the folder only contains text file such as TXT or CSV, these files can be deleted.</p>

<p>Now all of my old programs that I did not changed anything for a long time also have this issue.</p>

<p>If the folder has less than 2 documents, these files can be deleted. If more than that, it does not work.</p>

<p>Could you please help me with this issue and let me know how I can fix it ?</p>

<p>Thanks,</p>

<p>Tu.</p>
