Solved

Deleting Folders With VB

Posted on 1998-12-09
2
252 Views
Last Modified: 2010-05-03
How can you remove a folder which contains files and other folders.  Is it possible to delete these all at once if you know the path to the files and how?
0
Comment
Question by:sye
2 Comments
 
LVL 1

Accepted Solution

by:
slobstar earned 50 total points
ID: 1449036
You will have to remove them seperatly!

RmDir path             'for the folders
Kill path              'for the files

ex:
Kill "c:\new\*.*"      'delete all files in the new folder

Just write a small function to read through your filesystem and delete whatever you want to delete...

Good Luck!

     
0
 

Author Comment

by:sye
ID: 1449037
I was hoping there was a way to delete them all at once same as deleting a folder in explorer


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

760 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

18 Experts available now in Live!

Get 1:1 Help Now