Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Delete complete folder

Reply
Thread Tools

Delete complete folder

 
 
Gérard Leclercq
Guest
Posts: n/a
 
      10-19-2005
Can't find exemple. How can i delete a complete folder including subfolders
and files in the subfolders. Or do i to delete one by one ?

Gérard.


 
Reply With Quote
 
 
 
 
McKirahan
Guest
Posts: n/a
 
      10-19-2005
"Gérard Leclercq" <(E-Mail Removed)> wrote in message
news:Btr5f.26933$(E-Mail Removed)-ops.be...
> Can't find exemple. How can i delete a complete folder including

subfolders
> and files in the subfolders. Or do i to delete one by one ?
>
> Gérard.


If using the Command Prompt is an option then use DELTREE.


C:\>deltree /?
Deletes a directory and all the subdirectories and files in it.

To delete one or more files and directories:
DELTREE [/Y] [drive:]path [[drive:]path[...]]

/Y Suppresses prompting to confirm you want to delete
the subdirectory.
[drive:]path Specifies the name of the directory you want to delete.

Note: Use DELTREE cautiously. Every file and subdirectory within the
specified directory will be deleted.


 
Reply With Quote
 
 
 
 
Gérard Leclercq
Guest
Posts: n/a
 
      10-19-2005
This is an ASP group i suppose, not a DOS group. So i suppose an ASP exemple
on how to delete a complete folder including all underlaying folders and
files.
Gérard


 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      10-19-2005
deltree isn't on all OS's

"del" will work, look at the /s option

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com



"McKirahan" wrote:

> "GĂ©rard Leclercq" <(E-Mail Removed)> wrote in message
> news:Btr5f.26933$(E-Mail Removed)-ops.be...
> > Can't find exemple. How can i delete a complete folder including

> subfolders
> > and files in the subfolders. Or do i to delete one by one ?
> >
> > GĂ©rard.

>
> If using the Command Prompt is an option then use DELTREE.
>
>
> C:\>deltree /?
> Deletes a directory and all the subdirectories and files in it.
>
> To delete one or more files and directories:
> DELTREE [/Y] [drive:]path [[drive:]path[...]]
>
> /Y Suppresses prompting to confirm you want to delete
> the subdirectory.
> [drive:]path Specifies the name of the directory you want to delete.
>
> Note: Use DELTREE cautiously. Every file and subdirectory within the
> specified directory will be deleted.
>
>
>

 
Reply With Quote
 
McKirahan
Guest
Posts: n/a
 
      10-19-2005
"Gérard Leclercq" <(E-Mail Removed)> wrote in message
news:UJr5f.26941$(E-Mail Removed)-ops.be...
> This is an ASP group i suppose, not a DOS group. So i suppose an ASP

exemple
> on how to delete a complete folder including all underlaying folders and
> files.
> Gérard



Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder(Server.MapPath("\Temp"))
Set objFSO = Nothing

Or

Server.CreateObject("Scripting.FileSystemObject"). DeleteFolder(Server.MapPat
h("\Temp"))


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Releases: Mr. & Mrs. Smith, Complete Buffy & Enterprise: Updated complete R1 DVD DB & info lists Doug MacLean DVD Video 0 08-09-2005 05:07 AM
Selective delete of auto complete list in Firefox? Jim Firefox 2 03-06-2005 07:38 PM
Re: Request: A+ Complete 3rd edition (PDF) [1/1] - A+ Complete 3rd edition.txt (1/1) Spammy Sammy A+ Certification 0 03-04-2005 12:55 PM
New Releases: Criterion additions, WB Gangsters & Coupling: Complete: Updated complete downloadable R1 DVD DB& info lists Doug MacLean DVD Video 4 11-07-2004 05:20 PM
Mr. Bean Complete Bean NOT complete!! Waterperson77 DVD Video 5 12-10-2003 05:22 PM



Advertisments