How to delete a 0 Kb file reported as a not found by Windows ?

I ran into this incredibly frustrating issue while generating some CSV files for GPT Assistants : a 0 kb file had been created, and when trying to delete, it failed with a windows error message reporting that the file didn’t exist :

The file properties didn’t look odd, except for the 0 Kb size, and the missing extension :

After testing some command lines with “del”, trying to rename the file, move it, delete the whole folder using third party tools like Total Commander, the only thing that worked was that command line to remove the whole folder :

rd /s "\\?\d:\code\xml2csv\target\test-classes"

And eventually, I found the issue : the problematic filename was generated automatically by an app, and contained invalid characters : “Code civil – Titre préliminaire : De la publication, des effets et de l’application des lois en général.csv”, which were responsible of the invalid file state. The filename was displayed only up to the “:”.

Leave a Reply

Your email address will not be published. Required fields are marked *