• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

How to erase all files in a Directory within MS Access

Hi guys, I'm trying to write a procedure that:
1)Allows me to erase all the files within a specified directory.
even if
2)The directory is empty.

  • 3
1 Solution
Jeffrey CoachmanMIS LiasonCommented:
Kill "C:\YourFolder\*.*"
Jeffrey CoachmanMIS LiasonCommented:
In a lot of systems "Kill" is not allowed...

In that case you can use the "FileSystemObject"
See here:
VellenawethAuthor Commented:
Yep, the "kill" stuff gives me a "File not found".
Gonna try the other solution.
Jeffrey CoachmanMIS LiasonCommented:
Well, "File not found" means just that...
It could not find the file.
Be *sure* to check your spelling...
..Check the spelling of the *Folder* as well.

If the file you specify is MyName.txt,
 but the actual file name is: MyName1.txt
...Then any system will display "File not found"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now