How to delete folder from the command prompt?

J

Jack

Hello,
In the old good days there was a 'deltree' command (DOS & Win98) to delete
folder with subfolders from the command line.
Now, I need that to do in Vista.
How to do that?
Jack
 
J

Jack

Forgot to add.
I am right now starring at command prompt produced by Vista DVD installation
disk in repair mode.
I have access to that DVD and to c:\Windows folder which is XP windows.
Jack
 
K

Keith Miller \(MVP\)

C:\Users\Keith>rd /?
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]
 
R

R. C. White

Hi, Jack.

How about: rd /s

Rd is Remove Directory, of course, and the /s switch removes all the
subfolders, too. As usual in the Command Prompt window (which we old-timers
still call the "DOS window" even though we know it's not really DOS), type
the command followed by /? for what I call a mini-Help file that shows the
switches and parameters available with the command. Rd offers only a
couple: /s and /q.

It's a little surprising - to me, at least - that rd won't work if there are
files in the folder, but rd /s will.

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP
(Running Windows Live Mail 2008 in Vista Ultimate x64 SP1)
 
J

Jack

That removes only empty folders!
Jack

Keith Miller (MVP) said:
C:\Users\Keith>rd /?
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a
directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



Jack said:
Forgot to add.
I am right now starring at command prompt produced by Vista DVD
installation disk in repair mode.
I have access to that DVD and to c:\Windows folder which is XP windows.
Jack
 
J

Jack

Thanks.
I have tried rd and rmdir and both told me that folders are not empty.
Stupid me, forgot about switches!
Jack
 
J

Jack

sorry, forgot about switches!
Jack

Jack said:
That removes only empty folders!
Jack

Keith Miller (MVP) said:
C:\Users\Keith>rd /?
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a
directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with
/S


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



Jack said:
Forgot to add.
I am right now starring at command prompt produced by Vista DVD
installation disk in repair mode.
I have access to that DVD and to c:\Windows folder which is XP windows.
Jack

Hello,
In the old good days there was a 'deltree' command (DOS & Win98) to
delete folder with subfolders from the command line.
Now, I need that to do in Vista.
How to do that?
Jack
 
K

Keith Miller \(MVP\)

Glad to help.

--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



Jack said:
sorry, forgot about switches!
Jack

Jack said:
That removes only empty folders!
Jack

Keith Miller (MVP) said:
C:\Users\Keith>rd /?
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a
directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with
/S


--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



Forgot to add.
I am right now starring at command prompt produced by Vista DVD
installation disk in repair mode.
I have access to that DVD and to c:\Windows folder which is XP windows.
Jack

Hello,
In the old good days there was a 'deltree' command (DOS & Win98) to
delete folder with subfolders from the command line.
Now, I need that to do in Vista.
How to do that?
Jack
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top