Re: Deleting Directories with BAT File
From: R. C. White (RCWhite_at_msn.com)
Date: 05/04/04
- Next message: Tom Pors: "offline file synchronization"
- Previous message: Timothy: "FTP File Issue"
- In reply to: John Doue: "Re: Deleting Directories with BAT File"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Tom Pors: "offline file synchronization"
- Previous message: Timothy: "FTP File Issue"
- In reply to: John Doue: "Re: Deleting Directories with BAT File"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|