Android Question Delete all files in a directory

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Hello,

I'm trying file.delete(dir,"*.*") but it's not working... how can I do that?
 

Peter Simpson

Expert
Licensed User
Longtime User
I would use one of the many read file names in folder routines that can be found in this forum and once you have read the file name I would then delete the file. You could also read and store the file names into a list, once you have finished populating the list you have all the file names that you can then delete, there are plenty of ways to do what you are looking for...
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0
Top