Android Question Delete all files in a directory

Discussion in 'Android Questions' started by Marcos Alves, Jul 13, 2018.

  1. Marcos Alves

    Marcos Alves Active Member Licensed User

    Hello,

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

    Peter Simpson Expert Licensed 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...
     
    BillMeyer likes this.
  3. DonManfred

    DonManfred Expert Licensed User

    Last edited: Jul 13, 2018
    KMatle and Marcos Alves like this.
  4. Marcos Alves

    Marcos Alves Active Member Licensed User

  5. DonManfred

    DonManfred Expert Licensed User

    See the class. You can use Wildcards with the class.
     
    Marcos Alves likes this.
  6. Marcos Alves

    Marcos Alves Active Member Licensed User

    thanks!!!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice