Deleting multiple files at ones

Discussion in 'Questions (Windows Mobile)' started by sonavep, Apr 21, 2008.

  1. sonavep

    sonavep New Member

    Hello, I'm a newbee so maybe this is a kind of stupid question.

    I want te delete multiple files at ones. All the filenames begin with NLrebo.
    So there is NLreboaa.bar, NLrebots.bar, NLrebo23.bar.... etc

    I thought I could use the command FileDel (NLrebo*.bar) but that doesn't work.:sign0137:

    How can I fix this..


    Peter
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use something like: (don't forget to add the ArrayList named ArrayList1)
    Code:
    Sub App_Start
        FileSearch(ArrayList1,AppPath,
    "nlRebo*.bar")
        
    For i = 0 To ArrayList1.Count-1
            FileDel(ArrayList1.Item(i))
        
    Next
        ArrayList1.Clear
    End Sub
     
  3. sonavep

    sonavep New Member

    Thanks

    Great, thanks:sign0060:

    I will try that tonight.

    Thanks for the quick respons

    Peter
     
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