How to delete specific files in a folder with Access VBA

10 pts.
Tags:
Microsoft Access
VBA
I'm looking to delete all files in a folder, except 3 specific ones. All files in this folder are .csv files, and all of the file names are different. Let's call the 3 files I do not want to delete "Jim.csv", "Chuck.csv", and "Matt.csv". Is there a way to delete all files EXCEPT the ones you specify?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    Looks like you already know how to delete files.

    If that is the case, i was thinking about moving those files to some other folder temporarily (or even renaming them), delete all csv files, and then getting those 3 to their normal location/extension.
    84,580 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: