PDA

View Full Version : delete directory in dos



yingxuan
09-03-2004, 01:53 PM
hi

I want to delete a folder in dos on a floopy drive
What i typed was

del A:\in500
then pressed enter

It then came up with
A:\in500*, are u sure (y,N)
I then typed yes and pressed enter

The folder still exists.What did i do wrong?
I tried looking at google.I've typed everything correct.Why is the folder not deleted ?

Obelix
09-03-2004, 02:07 PM
You also need to

rmdir a:\in500 or,

rd a:\in500

Either of these command will remove a DOS directory.

yingxuan
09-03-2004, 02:21 PM
It worked

What does rd and rmd stand for?

Barnabas
09-03-2004, 03:11 PM
remove directory

Graham L
09-03-2004, 03:14 PM
rmdir and rd both mean "Remove a directory". del means "delete a file". It is handy to have different commands because they are different operations. (e.g. a directory won't be deleted if it has files in it and the system checks first.)

Pheonix
09-03-2004, 04:40 PM
And another favourite, deltree, which removes the folder named along with all subfolders and files.

yingxuan
11-03-2004, 01:57 AM
In dos.IF u type dir.IT'll show all the folders.But if i compare windows explorer and dos.It seems that some of the folders are not displayed in dos.Whys that and how do i get it to show?
One more question.If u type dir.It'll show the list of folders in 2 seconds.There's no scroll up page up or down so.. some of the folders in the top half cannot be seen.How do i view them?

Thanks for the help from the last posts

Elephant
11-03-2004, 02:11 AM
In DOS you can type "dir /w /p"

Forget the quote marks.

dir /w /p will give you a directory listing across the page. Thats the /w switch. The /p switch will stop the list scrolling down too fast for you to read it and just stop at the end of page where you will get a more prompt.

Elephant
11-03-2004, 02:21 AM
> In dos.IF u type dir.IT'll show all the folders.But
> if i compare windows explorer and dos.It seems that
> some of the folders are not displayed in dos.Whys
> that and how do i get it to show?
> One more question.If u type dir.It'll show the list
> of folders in 2 seconds.There's no scroll up page up
> or down so.. some of the folders in the top half
> cannot be seen.How do i view them?
>
> Thanks for the help from the last posts

Another DOS command is ATTRIB. This will allow you to see hidden and system files in DOS.

start in c:\

type attrib C:\*.* -r -h -s

This DOS command will remove all Read only, Hidden Files and System file attributes from your computer. Use this command VERY CAREFULLY!!!!!!

Some files are not meant to be changed!

Don't get into some of these DOS commands unless you have very good tested backups.

You have been warned!!!!!

whiskeytangofoxtrot
11-03-2004, 02:40 AM
>
> type attrib C:\*.* -r -h -s
>

I wouldn't type that into a PC I wanted to continue using :S

Elephant
11-03-2004, 02:58 AM
Exactly. But there again the question was asked.

Note the disclaimer about BACKUP!!!!!!!??????

:-)

bmason
11-03-2004, 12:52 PM
I've done that before without anything bad happening.

Anyway, a better way to show all files is to just do "DIR /A" You can make it default with "SET DIRCMD=/A".

Graham L
12-03-2004, 02:24 PM
Ogf course, attrib *.* gives a full directory list including hidden and system files, showing the attributes. :D