B4J Question delete file problem

Douglas Farias

Expert
Licensed User
Longtime User
hi all.
today i m trying to make a simple launcher for a game, the function is download zip files and extract this.

my problem its here
B4X:
         Case "jobatt"
           Dim out As OutputStream
         out = File.OpenOutput(File.DirApp,l.Get(0)&".zip",False)
         File.Copy2(Job.GetInputStream, out)
         out.Close
       
         zip.ABUnzip(File.DirApp & "/" & l.Get(0) & ".zip", File.DirApp & "/datas")
         If File.Exists(File.DirApp,l.Get(0) & ".zip") Then Log("exist")
         File.Delete(File.DirApp , l.Get(0) & ".zip")

this download a zip file, extract this, but when i go to delete the file not happens.
and its very strange on the windows i cant delete this too, show a mensage u cant delet because my .jar is using the zip files. why this?

my code looks correct, and the zip files as already extracted, why this still in use?
here is the lib i m using: https://www.b4x.com/android/forum/threads/zip-unzip-library.7053/
 

Attachments

  • Sem título.png
    Sem título.png
    260 KB · Views: 244
Last edited:
Top