Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
To delete a single file :
DELETE fileneme.xxx
or
DELETE C:\dirname\filename.xxxTo delete all files within a directory :
DELETE *.*
or
DELETE C:\dirname\*.*To remove a directory complete with file and/or sub-directories :
RMDIR C:\dirname

You can probably enter delete config.sys to delete it. I am not sure because DEL config.sys will delete your config.sys file. However, you need to enter
DELTREE Windows to remove your entire windows directory. RD or RMDIR will not remove a directory that has files in it.
You do this to remove a file. Say in windows you know the file is in the \Windows\command folder for example. For arguments sake say you put a readme.txt file in this folder by mistake. You select the dos prompt from windows or boot with a floppy. Then you change directories by entering CD \Windows\command. (You first have to enter C: if you booted from a floppy)
When you see C:\Windows\Command\> on the screen enter DIR/P. Hit any key until you scroll down until you see the file you want to delete. Press ctrl and C at the same time to keep from scrolling any further and enter DEL Readme.txt. (Readme.txt was probably at the bottom of the directory, but I am now assuming it was not) Enter DIR/p again and hit any key until you see there is no readme.txt where the file used to be.
That is the harder task. Usually you want to delete something in a directroy with only a few files in it or in the root of C:\.
Then you just enter C:\: enter DIR so you can see how the file is spelled; and enter DEL Readme.txt.

Yes DELETE & DEL are the same.
You are right about DELTREE however! RM & RMDIR only deletes empty directories.
But fred6008 do you have to go on and on about a simple answer! not just this one but all of your replys are the same.
End of Subject.

Thanks fred6008 for pointing out about RD & RMDIR I had forgot to add that one.
As \ points out DELETE & DEL do the same job.
But thats where it stops \. Who do you think you are? fred6008 does a good job here on computing.net. That I cannot say about you. You or some other \ is always posting negative posts. Grow up.
...

RMDIR command does removes directories even if they have files inside. All you have to add is /s at the end.
For Ex: RMDIR C:\dirname /s

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |