This should do it:
Code:
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
RetrieveFiles("Images.Dat")
End Sub
Sub RetrieveFiles (file)
FileOpen(c,file,cRandom)
bin.New1(c,false)
num = bin.ReadInt32 'read the number of images.
For i = 1 To num
bin.RetrieveFile("file" & num & ".dat")
Next
FileClose(c)
End Sub
Files will be named: file1.dat, file2.dat, ...