S sonavep New Member Apr 21, 2008 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Apr 21, 2008 #2 You can use something like: (don't forget to add the ArrayList named ArrayList1) B4X: Sub App_Start FileSearch(ArrayList1,AppPath,"nlRebo*.bar") For i = 0 To ArrayList1.Count-1 FileDel(ArrayList1.Item(i)) Next ArrayList1.Clear End Sub
You can use something like: (don't forget to add the ArrayList named ArrayList1) B4X: Sub App_Start FileSearch(ArrayList1,AppPath,"nlRebo*.bar") For i = 0 To ArrayList1.Count-1 FileDel(ArrayList1.Item(i)) Next ArrayList1.Clear End Sub
S sonavep New Member Apr 21, 2008 #3 Thanks Great, thanks:sign0060: I will try that tonight. Thanks for the quick respons Peter