Solved

VB5: An Oldie.

Posted on 1998-07-27
5
229 Views
Last Modified: 2010-05-03
I have asked this question before but didn't receive a satisfactory response.  This function keeps coming up for me though and it would really be nice to have a solution for it.

You only get the points for a complete and correct answer.

I would like a function that will delete a directory and all of its files and subdirectories.  

Sounds easy right?  It has to work.  No error messages.  No unexpected behavior.  All files must be deleted.

Please submit source code in VB5 so that I may run and test it.

Lankford
0
Comment
Question by:lankford
5 Comments
 
LVL 3

Expert Comment

by:dapperry
Comment Utility
Does this function need to work in Win NT?  I have a very basic function usuing a shelled
deltree command, that works in Win95.  It works because Win95 includes the DOS deltree command.  I have a VB5 sample app that uses the code, which I can email to you, just email me with your email address at: dperry@rapidtrack.com .  If you need it to work in NT, let me know, I have code mostly written for a non-deltree way of doing it.

:) D Perry
0
 
LVL 9

Expert Comment

by:Dalin
Comment Utility
dapperry,
You should not lock the question if you are not provide an answer.

0
 

Author Comment

by:lankford
Comment Utility
Yes,

I need this to work on all 32-bit Windows platforms.

Robert
0
 
LVL 1

Accepted Solution

by:
SeanGiles earned 300 total points
Comment Utility
go to http://www.planet-source-code.com/vb/ and search for "delete directory".  Only change I would make to this code is to check any file attributes that would cause the  vb "kill" command to fail and change them with SetAttr first.

 
0
 

Author Comment

by:lankford
Comment Utility
Aaahhh.  Exxxcellent!

Mr. Burns
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now