Thread: 0byte .exe files..

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    28

    0byte .exe files..

    Has anyone else noticed that if you create a new text file or whatever, then rename it to whatever.exe, so its 0 bytes you can not delete it?

    This happened to me on my Windows XP machine.
    I asked a friend to try it on his Win 2000 machine and it couldnt be deleted on that either.

    I had to close explorer.exe process and delete them from within the console.

    I know its a nonsense post but why the hell does this happen?

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    It works fine for me. I can delete them without problems.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    You are right, when I create a new txt file and rename it to whatever.exe, I cannot delete it because the file is in use. I have all available patches and no background processes like virus scanners playing around with my files. Strange.

    If you close the explorer, it's no longer in use and you can delete it normally.

    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    I didn't have this problem. It worked fine for me.
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  5. #5
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536
    I haven't had this problem myself, but one of my friends did. He wrote a simple program that copied files, and whenever he copied an empty text file and renamed it to .exe the file could not be deleted. Assumed it was the fault of the prorgam, not Windows!

  6. #6
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    I can easily delete them without problems.
    Do not make direct eye contact with me.

  7. #7
    Hmm. Happens to me too. I figured it would. My system occasionally refuses to allow deletion of executable files. Most commonly they're installers (although this is probably a falsely measured statistic since I'd imagine that installers are the most commonly deleted exe). The most common solution is to reboot, then immediatly delete the offending file. Moving, or otherwise manipulating the file will cause it become undeletable again.

    I have no idea why this occures. I'm 100% virus free, w/o spyware or strange apps of any kind. These all appear to be entirely XP based issues.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  8. #8
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    >These all appear to be entirely XP based issues.

    I run 2K SP4.

    Tested it with an out-of-the-box Win2003 EE Server with the latest patches and I could delete it without problems.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  9. #9
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    For me, I sometimes can't delete folders. I have to restart - even when the folders are completly empty.
    Do not make direct eye contact with me.

  10. #10
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    >then rename it to whatever.exe, so its 0 bytes you can not delete it?

    Sounds interesting. But I won't risk it. I won't sleep tonight knowing there is a file on my HD I can't delete.

    What really annoys me is every time I switch themes in XP, the Windows sounds are reset to the intensly irritating M$ default sound. As I test out applications under different themes, I have to do it a lot. Drives me crackers.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  11. #11
    Quote Originally Posted by Davros
    Sounds interesting. But I won't risk it. I won't sleep tonight knowing there is a file on my HD I can't delete
    You could always rename it back to a txt file and then delete it.

  12. #12
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    Once you had this phenomenon, you can't rename it either with the same error message.

    You can close the explorer and delete it manually from a shell though.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  13. #13
    sometimes when I can't delete a file I create an extra empty txt file.
    then I select them both and I'm able to delete both of them at the same time.

    It doesn't work always

    BTW, I can delete the 0 byte exe file with no problem. (winXP with complete windows update )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 06:55 AM
  2. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 08:36 AM
  3. Replies: 4
    Last Post: 07-24-2008, 09:02 AM
  4. Running the application (.exe) files on other PCs
    By csonx_p in forum Windows Programming
    Replies: 11
    Last Post: 06-11-2008, 09:31 PM
  5. Problem creating .exe files
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 03-22-2002, 02:25 PM