Computing.Net > Forums > Disk Operating System > How can I remove files in DOS ?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How can I remove files in DOS ?

Reply to Message Icon

Name: FEST
Date: April 28, 2002 at 00:20:53 Pacific
Comment:

How can I remove/Delete files in dos mode not by using format drive:

Thanks !!



Sponsored Link
Ads by Google

Response Number 1
Name: ...
Date: April 28, 2002 at 02:09:39 Pacific
Reply:

To delete a single file :
DELETE fileneme.xxx
or
DELETE C:\dirname\filename.xxx

To 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


0

Response Number 2
Name: fred6008
Date: April 28, 2002 at 08:29:57 Pacific
Reply:

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.


0

Response Number 3
Name: \
Date: April 28, 2002 at 14:23:22 Pacific
Reply:

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.


0

Response Number 4
Name: ...
Date: April 28, 2002 at 14:48:01 Pacific
Reply:

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.

...


0

Response Number 5
Name: W0rm
Date: April 28, 2002 at 18:46:12 Pacific
Reply:

there is *NO* delete command, there is a "del" but no "delete".
- W0rm


0

Related Posts

See More



Response Number 6
Name: Silent Bob
Date: April 29, 2002 at 20:04:34 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: How can I remove files in DOS ?

copying files in use www.computing.net/answers/dos/copying-files-in-use/5247.html

How to find & delete files in DOS www.computing.net/answers/dos/how-to-find-amp-delete-files-in-dos/5401.html

how to compress files in DOS www.computing.net/answers/dos/how-to-compress-files-in-dos/11671.html