Sorry, should have posted the code. I've also attached the ZIP file that it creates on my machine. The files extract OK with the ExtractZip() command.
//open file for writing
myfile = OpenToWrite("Numbers.dat",0)
// generate random number
num = Random(1,20)
// while num is not 12 do
while num <> 20
// write the number to file
WriteInteger(myfile,num)
// generate another random number
num = Random(1,20)
endwhile
Closefile(myfile)
// open file to read
myfile2 = OpenToRead("Numbers.dat")
num2 = ReadInteger(myfile2)
while fileEOF(myfile2) <> 1
Print(num2)
num2 = ReadInteger(myfile2)
endwhile
CloseFile(myfile2)
Print("done")
x = CreateZip("Numbers.zip")
AddZipEntry(x,"Numbers.dat","")
CloseZip(x)
ExtractZip("Numbers.zip","/extracted")
do
loop
The ZIP file has data in it and I did get it to extract once (I swear), but now I cannot get it to extract again either.
The Numbers.dat file is created in the <user>/My Documents/AGK/LongFile/media
directory as well as the ZIP file.
When I open the ZIP file with WinRAR it shows no files and I receive the following error message when attempting to extract the file with WinRAR.
! C:\Users\Sean\Documents\AGK\LongFile\media\Numbers.zip: Cannot create
! The system cannot find the path specified.
! C:\Users\Seam\Documents\AGK\LongFile\media\Numbers.zip: Attempting to correct the invalid file name
! C:\Users\Seam\Documents\AGK\LongFile\media\Numbers.zip: Cannot create
! The system cannot find the path specified.
! C:\Users\Sean\Documents\AGK\LongFile\media\Numbers.zip: Attempting to correct the invalid file name
It feels like I'm doing something wrong, but not sure what!
I'm using 1088 beta.
Thanks for the help.