Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

directory list box - deleting a directory

Posted on 2000-04-30
2
Medium Priority
?
158 Views
Last Modified: 2010-05-02
How can I determine which folder I've selected and then delete that selected folder?  
I have tried using
kill dir1.path & "*.*" followed by
rmdir dir1.path  

then I call
dir1.refresh

I would think this would work, but I must be missing something.

If I need to be doing this another way, I'm willing to change the methods.

Thanks in advance for the help.
Daron
0
Comment
Question by:daron
2 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 30 total points
ID: 2764895
http://www.vb-helper.com/Howto/rrmdir.zip

shows how to recurse through the directory and delete all subfolders and files within it
0
 

Expert Comment

by:moterk
ID: 2766451
kill dir1.path & "*.*"

should be:

kill dir1.path & "\*.*"

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question