Solved

Deleting Folders With VB

Posted on 1998-12-09
2
253 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINQ return type for nested group query 6 71
VB error "Type mismatch" 2 49
Passing a Text Box name to a Sub 6 74
Added a column screws up code 5 49
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

911 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

23 Experts available now in Live!

Get 1:1 Help Now