Solved

directory list box - deleting a directory

Posted on 2000-04-30
2
151 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 10 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 59
Saving history changes to sub form 4 42
Can we place a tooltip on the actual vb6 form 5 41
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 51
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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