Re: Deleting Directories with BAT File

From: R. C. White (RCWhite_at_msn.com)
Date: 05/04/04


Date: Tue, 4 May 2004 16:32:22 -0500

Good catch, John.

But Tim has reported success, so I guess it worked out OK. Maybe there were
no in-use files in that particular directory. ;<)

RC

-- 
R. C. White, CPA
San Marcos, TX
rc@corridor.net
Microsoft Windows MVP
"John Doue" <notwobe@yahoo.com> wrote in message 
news:uE6T2jdMEHA.3872@TK2MSFTNGP12.phx.gbl...
> R. C. White wrote:
>> Hi, Tim.
>>
>> The del command deletes FILES, but it never was the command to delete 
>> directories (or folders).  In MS-DOS, we used rmdir or rd to Remove 
>> Directory.
>>
>> In the "DOS" window of Win2K/XP, or on the Command line, we still use rd 
>> <directory>.  As with any "DOS" command, we can type rd /? and see a 
>> mini-Help file showing all the switches available for the command.  There 
>> are only two switches for rd:  /q and /s.  The /s switch removes the 
>> entire directory tree, including all subdirectories and all files within 
>> them; it asks "are you sure?" before deleting.  The /q switch invokes the 
>> Quiet mode, which removes everything without asking.
>>
>> So, if you are sure you want to remove the entire directory tree and you 
>> know the name of the directory at the top of the tree, just put one short 
>> line in your batch file (for C:\Program Files\Fubar, for instance):
>>
>> rd "c:\program files\fubar" /s /q
>>
>> (The quotes, of course, are needed because of the space in "Program 
>> Files".)
>>
>> RC
> I believe you missed a crucial point from Tim's question: how to delete 
> files which are in use. I hope I addressed that point in my previous post 
> but we have not heard from Tim anymore.
>
> -- 
> John Doue 


Relevant Pages

  • Re: Directory tree
    ... Good for you, Tim, it doesn't. ... you see such advice. ... You can print a directory tree with a command line, ...
    (microsoft.public.windowsxp.basics)
  • Re: Deleting Directories with BAT File
    ... > The del command deletes FILES, but it never was the command to delete ... In MS-DOS, we used rmdir or rd to Remove ... if you are sure you want to remove the entire directory tree and you ... post but we have not heard from Tim anymore. ...
    (microsoft.public.win2000.file_system)
  • Jeff Relfs sci.physics posters list
    ... John Bailey ... Martin Michael Musatov ... Paul B. Andersen ... Tim BandTech.com ...
    (sci.physics)
  • Re: The grand success known as microsoftSF
    ... "Why have you never posted what Tim said on the matter in it's entirety ... several years before Apple, and now saying they are _copying Apple_ is ... So even though Tim Adams is on record saying he at ... least mostly agrees with the position John made, ...
    (comp.sys.mac.advocacy)
  • Re: The grand success known as microsoftSF
    ... "I agree with you that MS getting _back_ into the retail business is very ... several years before Apple, and now saying they are _copying Apple_ is ... It is clear that Tim is stating that Johns view that MS is copying Apple ... least mostly agrees with the position John made, ...
    (comp.sys.mac.advocacy)