Long ago in the MS DOS days. I recall being told that there was a difference between the DEL and ERASE commands. One just deleted the directory entry for the file (and therefore the file could in theory be restored), the other actually erased all the data from all the sectors that file was stored on (better for security).  However, although it would seem that intuitively DEL would do the former and ERASE  the latter, I also recall being told that the commands were not intuitively named, though that source wasn’t reliable.

Doing a Google search has turned up a plethora of sites on these commands, but all the ones I checked claim that both commands do exactly the same thing. Can anyone help me out here with the correct information on these two commands? Thanks!


About marinamichaels

Clear and compassionate psychic, excellent writer, top-notch mother, card-carrying genius, humble and modest to boot. What else can I say? Loving everything without losing sight of reality.
This entry was posted in Computers and tagged , , . Bookmark the permalink.

7 Responses to MS DOS DEL versus ERASE

  1. Lubos says:

    Good morning White Star,

    formal difference between DEL and ERASE command is that with DEL command you cannot use wildcards * (del C:/*.* will probably not function). But ERASE was designed to erase all disk space, so it can be used in this way-with wildcards (erase C:/*.* , erase everything on C without prompt, do not try at home:), at least I hope so, never tried it:)

    And if the file deleted with DEL or ERASE command can be recovered? Partially yes and partially no. You know, it is like with Government and Tenorists. What Government erases, cannot be recovered easy and usually recovering is unprofitable (It is hard to recover The Country, if all people that lives in get erased their free will). In case of tenorrists, I think, they try to use DEL command with hope that something changes and if not It can be recovered after.
    But who knows these days, who pretends to be who. And I am affraid to say, if everything is ONE, you are right in your thoughts that ERASE = DEL. So it really does not depend who is who in this game, what makes erase better than del, when the intetion to delete and erase something is the same, and we must pay if we have got mistaken (of course without extend and precious knowledge of ancient MSDOS system:)

    But we must always remember, that somehow exist something that does not everybody know. And it is great UNDELETE command:)

    Wish you a nice MSDOS journey:D


    • Dr. M says:

      I found that the del command does take wildcards. In fact I use it a batch file to clean up my mail server. As posted C:/ andthing will not work under the command prompt I don’t think? In my experience you must use C:\

  2. I don’t know that this is actually helpful, as it is only an inference and untimely (I just stumbled across this while looking for information about the command).

    When I run help c:\>DEL /? the output shows flags as being effective for both ERASE and DEL.

    Additionally, running c:\>ERASE /? gives the same help output, and they both begin with a description of the command’s effect, namely “Deletes one or more files.”

  3. Anubhav C says:

    There’s no difference between the two. You can use both of them with wildcards.

    Please don’t leave misleading answers on random webpages. They can show up in people’s google searches several years later. (As it did for me.)

  4. Lar says:

    Del will put files in the Recycle bin, and they need to be deleted form there. Erase does not move files to the recycle bin.

  5. Jabba No Badda says:

    Yes, this is a VERY old thread. I found it from a search and was like “huh? There is no difference!” In case someone else comes here I’ll clear it up for you:

    The original question is fine, but, seriously, why do multiple people choose to leave completely wrong information? Anubhav C is correct. ERASE is an alias of DEL. There is no difference. There has been no difference for a very long time. Even in DOS 3.3 from ~1988 they were the same command. No one I’ve ever talked to knows why someone would type erase instead of del, so it’s almost irresponsible to use it. At worst it shows you aren’t very familiar with the system. It is possible there was a difference at one time, but basically no one remembers.

    DEL does not send to recycle bin. Why would you make that up? Seriously. ERASE doesn’t either because it’s the same command. Lubos’s answer is filled with many mistakes that clearly shows he/she has no clue what he/she is talking about. I’m not sure Lubo has ever used DOS and the rant is just looney.

    Though neither command sends to the recycle bin, both commands do NOT wipe out the data and can be recovered with UNDELETE and other utilities.

    DEL with a directory will delete the contents, but not the directory. You need to use RD for that.

  6. george says:

    When Bill Gates told IBM he had an operating system for their new PC (he didn’t), the prominent operating system for microprocessors was CPM from Digital Research. CPM uses ERASE to remove files from disk. Bill then went out and purchased the rights to an alleged pirated version of CPM which still contained the CPM code for ERASE. ERASE is a legacy command from CPM. Is DOS a pirated version of CPM? I don’t know, you be the judge.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s