PDA

Click to See Complete Forum and Search --> : Delete directory and contents


Serge
Dec 1st, 1999, 12:13 AM
Youc 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.

------------------

Serge

Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)



[This message has been edited by Serge (edited 12-01-1999).]

sblouet
Dec 1st, 1999, 11:26 AM
We need to delete a directory and all its contents from within VB. This needs to be done without the user having to answer any prompts eg. Are you sure you want to delete this directory and all its contents?

Can anyone offer any pointers.

All help appreciated.