|
-
Nov 8th, 1999, 11:31 PM
#1
Thread Starter
Hyperactive Member
I need to delete a folder that has files in it and sub folders with files in them...etc...
How can I delete the parent folder and all the subfolders and files in it without deleting the individual files first?
------------------
Morgan
[email protected]
My Web Page
-
Nov 8th, 1999, 11:33 PM
#2
Addicted Member
RmDir dir1
------------------
smalig
[email protected]
smalig.tripod.com
-
Nov 8th, 1999, 11:38 PM
#3
Thread Starter
Hyperactive Member
RmDir won't delete a directory with files in it...
This Directory has anywhere from 20-50 subdirectories in it each with countless files in them...
------------------
Morgan
[email protected]
My Web Page
-
Nov 8th, 1999, 11:43 PM
#4
Try the FileSystemObject, eg.
Code:
Dim oFSO As Object
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFolder "C:\Test", True
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Nov 8th, 1999, 11:55 PM
#5
Thread Starter
Hyperactive Member
Ah Ha!! I had tried:
oFSO.DeleteFolder "C:\Test"
But it didn't work...
Then I tried your
oFSO.DeleteFolder "C:\Test", True
and it worked...
Thanks!!!
------------------
Morgan
[email protected]
My Web Page
-
Nov 9th, 1999, 01:06 AM
#6
Yes, the second parameter indicates where the files or folders in that folder should be removed.
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Nov 9th, 1999, 07:47 AM
#7
Member
why not Kill(path) ?
that would work wouldnt it?
-
Jan 12th, 2000, 07:33 PM
#8
New Member
Sorry Howard, the kill is for single files only
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|