Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
Gordon J. Rattray wrote:
> Hi there,
>
> I am creating a batch file and want to delete everything in a folder
> using a dos command.
>
> I want to do it with one or 2 commands. Del does not work, such as
> "del *.*"
>
> How do I delete all folders within a folder with one dos command?
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
Gordon J. Rattray wrote:
> Hi there,
>
> I am creating a batch file and want to delete everything in a folder using a
> dos command.
>
> I want to do it with one or 2 commands. Del does not work, such as "del *.*"
>
> How do I delete all folders within a folder with one dos command?
>
Hi,
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
Have you tried DEL with the /S option?
For info on the full set of options for any "DOS" command, open a command
prompt, then type the command followed by /?.
"Gordon J. Rattray" <gords@shaw.ca> wrote in message
newsUxIGIwtFHA.596@TK2MSFTNGP12.phx.gbl...
> Hi there,
>
> I am creating a batch file and want to delete everything in a folder using
> a
> dos command.
>
> I want to do it with one or 2 commands. Del does not work, such as "del
> *.*"
>
> How do I delete all folders within a folder with one dos command?
>
> Thanks,
>
> Gordon
>
>
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
Go to bookstore and buy the book Microsoft Windows Command-Line ISBN
0-7356-2038-5 www.microsoft.com/mspress
"Gordon J. Rattray" <gords@shaw.ca> wrote in message
newsUxIGIwtFHA.596@TK2MSFTNGP12.phx.gbl...
> Hi there,
>
> I am creating a batch file and want to delete everything in a folder using
> a
> dos command.
>
> I want to do it with one or 2 commands. Del does not work, such as "del
> *.*"
>
> How do I delete all folders within a folder with one dos command?
>
> Thanks,
>
> Gordon
>
>
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
"Gordon J. Rattray" <gords@shaw.ca> wrote:
>Hi there,
>
>I am creating a batch file and want to delete everything in a folder using a
>dos command.
>
>I want to do it with one or 2 commands. Del does not work, such as "del *.*"
>
>How do I delete all folders within a folder with one dos command?
>
>Thanks,
>
>Gordon
>
Use the RD command to remove the folder and all contents then use the
MD command to create a new folder with the same name.
RD myfolder /S /Q
MD myfolder
/S will remove subfolders if they exist.
/Q will suppress the confirmation prompt
Good luck
Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
Gordon J. Rattray wrote:
> I am creating a batch file and want to delete everything in a folder using a
> dos command.
>
> I want to do it with one or 2 commands. Del does not work, such as "del *.*"
>
> How do I delete all folders within a folder with one dos command?
Archived from groups: microsoft.public.windowsxp.basics,microsoft.public.windowsxp.general (More info?)
On Sun, 11 Sep 2005 14:08:47 -0700 in
microsoft.public.windowsxp.general, Jerry favored us with...
> Go to bookstore and buy the book Microsoft Windows Command-Line ISBN
> 0-7356-2038-5 www.microsoft.com/mspress
(Copy the above line and paste it in a Start->Run window.)
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/ "What in heaven's name brought you to Casablanca?"
"My health. I came to Casablanca for the waters."
"The waters? What waters? We're in the desert."
"I was misinformed."
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.