Computing.Net > Forums > Disk Operating System > how to delete something in dos

how to delete something in dos

Reply to Message Icon

Original Message
Name: ahhhhhh
Date: July 22, 2002 at 16:28:26 Pacific
Subject: how to delete something in dos
Comment:

hi ppls
i recently posted a message in the winME section about a problem i was haveing with deleteing a file on my desktop and they recommend deleteing it through dos and i just wanna know how i can delete something off my desktop using dos??


Report Offensive Message For Removal


Response Number 1
Name: Andrew Ordo
Date: July 22, 2002 at 16:41:42 Pacific
Subject: how to delete something in dos
Reply: (edit)

DEL [drive:][path]filename

or

DELETE [drive:][path]filename

or

ERASE [drive:][path]filename


These aren't all universally supported in all DOSes. Some versions of MS-DOS may not support "DELETE", but "DEL" is supported with all DOSes from Microsoft.

To delete a file named FILE.TXT that resides in C:\WIN\SYSTEM, for example, just type

DEL C:\WIN\SYSTEM\FILE.TXT

and press ENTER.

You could also CD into the directory and simply type

DEL FILE.TXT


You don't have to specify the full path if the file you want to delete is in the current directory.


Cheers!


Report Offensive Follow Up For Removal

Response Number 2
Name: Andrew Ordo
Date: July 22, 2002 at 16:42:37 Pacific
Subject: how to delete something in dos
Reply: (edit)

Oh--and another thing:

You might have to change a file's attribute if it's marked read-only or system. In that case, use ATTRIB.


Report Offensive Follow Up For Removal

Response Number 3
Name: Dan Penny
Date: July 22, 2002 at 18:51:53 Pacific
Subject: how to delete something in dos
Reply: (edit)

Or use deltree/y. It over-rides attribs. The /y is the "automatic" confirmation, it won't ask if you're sure you want to delete.
Example;

deltree/y c:\windows\desktop\filename.ext


Report Offensive Follow Up For Removal

Response Number 4
Name: Renaissance Man
Date: July 22, 2002 at 22:24:03 Pacific
Subject: how to delete something in dos
Reply: (edit)

By saying "and they recommend deleteing it through dos..." I think they meant that you should use a WinME Startup disk. If the above advice doesn't work in a DOS window, use a Startup disk.

As far as I know, there never was a DELETE command in any version of MSDOS; it was always DEL.

I, too, like deltree but just to be on the safe side, I suggest using it without the / Y switch.



Report Offensive Follow Up For Removal

Response Number 5
Name: fred6008
Date: July 23, 2002 at 00:12:57 Pacific
Subject: how to delete something in dos
Reply: (edit)

They may have meant use a startup disk for pure DOS, but this is necessary only in the few cases where something does not work in Windows. Format is the only problem I have had. Whether you use pure dos or go to the START>PROGRAMS>ACCESSORIES>MSDOS PRMPT on the start menu for a windows dos command line, you do the same thing once you get to C:>. You enter CD \WINDOWS\DESKTOP. Then you enter DIR. If the directory listing shows you your file name you are home. Just enter DEL filename.fle (or whatever). If it does not show your file in the desktop directory enter ATTRIB. This is like a DIR
used this way that shows hidden and system files. If you now see your file you need to enter ATTRIB -H -S -R filename.fle to see the file. Then enter DEL FILENAME.FLE.
Let me stress one caution: Be sure you want to remove a hidden or system file before you do so.


Report Offensive Follow Up For Removal


Response Number 6
Name: AHHH
Date: July 25, 2002 at 11:13:51 Pacific
Subject: how to delete something in dos
Reply: (edit)

Is it possible to delete directories in DOS?
I am trying to indtall windows 98 in a partition. I have XP on a nother partition, and when windows dost the system checks durring the set up, it wont let me continue because of XP's system volume information folder. it says that one of the sub directories has an invalid file name.


Report Offensive Follow Up For Removal

Response Number 7
Name: Dan Penny
Date: July 25, 2002 at 11:47:01 Pacific
Subject: how to delete something in dos
Reply: (edit)

Same thing (example);

deltree/y c:windows\dirname\*.*

deletes everything within the directory, or

deltree/y c:windows\dirname

deletes the directory and anything in it.


Report Offensive Follow Up For Removal

Response Number 8
Name: Renaissance Man
Date: July 25, 2002 at 12:51:42 Pacific
Subject: how to delete something in dos
Reply: (edit)

deltree/y c:windows\dirname\

deletes everything within the directory


Report Offensive Follow Up For Removal

Response Number 9
Name: Dan Penny
Date: July 25, 2002 at 21:15:37 Pacific
Subject: how to delete something in dos
Reply: (edit)

OK, OK, they both do the same thing. With Ren Man's you save three key strokes.

;>)


Report Offensive Follow Up For Removal

Response Number 10
Name: miah
Date: August 30, 2002 at 10:26:37 Pacific
Subject: how to delete something in dos
Reply: (edit)

UM..... deltree is not built into dos from rescuedisk or on command prompt only. did they change the command?


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: how to delete something in dos

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge