Archived from groups: microsoft.public.win2000.file_system (
More info?)
Thank you to all of you for your suggestions.
Since I am running this in a Win2K environment, I am going
with rd "C:\Program Files\directory name" /s /q. Seems to
work like a champ.
Thanks again for all of the ideas. These will definetly
come in handy in the future.
>-----Original Message-----
>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
>.
>