PDA

Click to See Complete Forum and Search --> : Delete folder


CyberCarsten
Jan 5th, 2000, 05:10 AM
How can i delete a selected folder in a DirList Box???

i have tried RmDir Dir1.Path
No go!


------------------
Yours sincierly
CyberCarsten
http://homee18.inet.tele.dk/cyber/
carsten.h.thomsen@mail.tele.dk

Jan 5th, 2000, 05:52 AM
You can use FileSystem Object.
Add a reference to Microsoft Scripting Runtime Library. Then use use:

Dim oFS As New FileSystemObject
oFS.DeleteFolder "C:\MyFolder"

Note: You would have to include scrrun.dll with your project after you compile it.

Thanks goes to Surge for this nice peice of work.. :)


------------------
John T. Mieske
Star Trek LCARS programmer

Knight Vision Enterprises
kvision@gate.net

Clunietp
Jan 5th, 2000, 01:27 PM
RmDir only works when the folder is empty