This question is not the same as How to delete an invincible 0 byte file? since none of the answers have worked and my impossible to delete file I "feeeel" is different.
I was following this website to delete a folder with a node_modules folder. These take forever to delete using the File Explorer, and I can never remember the exact command to run every time. So I looked it up.
I use the following command or my fudgy fingers and terrible eyes processed what I thought was:
DEL /F/Q/S *.* > NUL
This deleted all of the files in the folder, but created this NUL file with 0 bytes. This tells me I messed up the command and something was piped to NUL when the link says
> NUL is suppose to disable console output.
I've tried File Commander,
dir /x doesn't show anything different from
dir, the delete button in the file explorer, specifying all permissions on the file and trying everything again. Doesn't work.
I tried piping text into it hoping life could get easier if it had something in it. This didn't pipe any text into the file:
echo "Hello world" > NUL
Being a programmer, I thought I could go deeper and write a c program to delete it. Nope. Didn't work.
if(remove("C:/../../NUL") == 0) printf("Deleted successfully"); else printf("Unable to delete the file");
I tried writing text to the file in C and that also failed. Then I tried reading from it and writing the buffer stream to a new file.
FILE *fp; FILE *fp2; char buff; fp = fopen("C:/../../NUL", "r"); fp2 = fopen("C:/../../cmd.txt", "w"); fgets(buff, 255, (FILE*)fp); fputs(buff, fp2); fclose(fp); fclose(fp2);
I found two characters are in it. þa. No idea what "þa" represents. When I print the characters out to the console in Eclipse there's three of them and they are " aw". The first character is a blocked question mark. It's a little different looking from the Unicode replacement character. So now I'm here and left will a Scooby Doo mystery of these mysterious characters, a fudged command that created these characters, and a file that's unable to be deleted.
For some reason the first character in the string isn't saving so I grabbed some snippets from the Eclipse console output and for some reason Chrome also rendered it differently so I snagged a picture from there too. https://ibb.co/yQSfD8b