• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How to delete folder from the command prompt?

J
#1
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
 

My Computer

J
#2
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

"Jack" <replyto@xxxxxx> wrote in message
news:u9j$Ix$fIHA.2448@xxxxxx

> 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
>
 

My Computer

K

Keith Miller \(MVP\)

#3
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" <replyto@xxxxxx> wrote in message
news:%23a9uC0$fIHA.2000@xxxxxx

> 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
>
> "Jack" <replyto@xxxxxx> wrote in message
> news:u9j$Ix$fIHA.2448@xxxxxx

>> 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
>>
>
>
 

My Computer

R

R. C. White

#4
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
rc@xxxxxx
Microsoft Windows MVP
(Running Windows Live Mail 2008 in Vista Ultimate x64 SP1)

"Jack" <replyto@xxxxxx> wrote in message
news:u9j$Ix$fIHA.2448@xxxxxx

> 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
 

My Computer

J
#5
That removes only empty folders!
Jack

" Keith Miller (MVP)" <k.miller@xxxxxx> wrote in message
news:%23$cD9PAgIHA.4164@xxxxxx

> 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" <replyto@xxxxxx> wrote in message
> news:%23a9uC0$fIHA.2000@xxxxxx

>> 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
>>
>> "Jack" <replyto@xxxxxx> wrote in message
>> news:u9j$Ix$fIHA.2448@xxxxxx

>>> 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
>>>
>>
>>
>
 

My Computer

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

"R. C. White" <rc@xxxxxx> wrote in message
news:31BF464B-AD3B-4072-84C9-1E347F8E0A1C@xxxxxx

> 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
> rc@xxxxxx
> Microsoft Windows MVP
> (Running Windows Live Mail 2008 in Vista Ultimate x64 SP1)
>
> "Jack" <replyto@xxxxxx> wrote in message
> news:u9j$Ix$fIHA.2448@xxxxxx

>> 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
>
 

My Computer

J
#7
sorry, forgot about switches!
Jack

"Jack" <replyto@xxxxxx> wrote in message
news:%23abPRZAgIHA.5348@xxxxxx

> That removes only empty folders!
> Jack
>
> " Keith Miller (MVP)" <k.miller@xxxxxx> wrote in message
> news:%23$cD9PAgIHA.4164@xxxxxx

>> 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" <replyto@xxxxxx> wrote in message
>> news:%23a9uC0$fIHA.2000@xxxxxx

>>> 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
>>>
>>> "Jack" <replyto@xxxxxx> wrote in message
>>> news:u9j$Ix$fIHA.2448@xxxxxx
>>>> 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
>>>>
>>>
>>>
>>
>
>
 

My Computer

K

Keith Miller \(MVP\)

#8
Glad to help.

--
Good Luck,

Keith
Microsoft MVP [Windows Shell/User]



"Jack" <replyto@xxxxxx> wrote in message
news:uMmISbAgIHA.6136@xxxxxx

> sorry, forgot about switches!
> Jack
>
> "Jack" <replyto@xxxxxx> wrote in message
> news:%23abPRZAgIHA.5348@xxxxxx

>> That removes only empty folders!
>> Jack
>>
>> " Keith Miller (MVP)" <k.miller@xxxxxx> wrote in message
>> news:%23$cD9PAgIHA.4164@xxxxxx

>>> 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" <replyto@xxxxxx> wrote in message
>>> news:%23a9uC0$fIHA.2000@xxxxxx
>>>> 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
>>>>
>>>> "Jack" <replyto@xxxxxx> wrote in message
>>>> news:u9j$Ix$fIHA.2448@xxxxxx
>>>>> 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
>>>>>
>>>>
>>>>
>>>
>>
>>
>
>
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)