473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Delete complete folder

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.
Oct 19 '05 #1
4 1990
"Gérard Leclercq" <ge*************@pas-de-mail.fr> wrote in message
news:Bt*********************@phobos.telenet-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.
Oct 19 '05 #2
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
Oct 19 '05 #3
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" <ge*************@pas-de-mail.fr> wrote in message
news:Bt*********************@phobos.telenet-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.

Oct 19 '05 #4
"Gérard Leclercq" <ge*************@pas-de-mail.fr> wrote in message
news:UJ*********************@phobos.telenet-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"))
Oct 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alf Laue | last post by:
Hi, how do I delete a folder at my ftp-server, that was automatically created through a installation script? I dont have the permission to delete that folder :-( Thx for your help Alf
11
by: Ben | last post by:
Greetings, I am looking for a way to search for and delete files based on a pattern mask. For example, the search method would find all files matching a certain pattern containing wildcards (e.g....
4
by: Mark Reed | last post by:
Hi all, I have the following code which imports the contents of all files within a set folder which works excellently. Once it has imported from each file, it deletes the file. Is there a way that...
3
by: krock_112 | last post by:
I'm trying to set up a group of shared folders. Folder 1 Folder 2 Common Share I want all users that have access to folder 2 to be able to create new folders, add documents to the sub folders,...
9
by: Paul | last post by:
I'm trying to make get my app to delete all the files in a specified folder and all the files within the folders of the specified folder. e.g. Folder 1 contains three files (File1, File2, File3)...
4
by: Zeb | last post by:
Hi I'm using DirectoryInfo.Delete so that when a product is removed, all it's associated images (including the folder they sit in) are deleted. This actually seems to work fine. However, the...
24
by: biganthony via AccessMonster.com | last post by:
Hi, I have the following code to select a folder and then delete it. I keep getting a Path/File error on the line that deletes the actual folder. The line before that line deletes the files in...
4
by: - HAL9000 | last post by:
When un-installing an application... Is it normal practice to write a special program that erases all the files and folders for all the users of an application that reads and writes to...
15
by: Morteneistrom | last post by:
Im a complete n00b at PHP so please forgive me if this i a stupid question Why wont the following work. PHP Code: <?php foreach (glob('../images/profil/*.jpg') as $filename) { echo...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.