Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Limitations in evaluation mode?


I have downloaded the zip utility to see if it will suit my needs but it doesn't seem to work completely or at least I'm missing something.
I can create a zip file with either the create or open service. I add files to it (images for now) using osread and then close the zip file.
When I check the location the zip file is definitely there but upon inspection it is empty.
The "Add" service returned 1 which I believe indicates success and I checked getlasterror each time just to be sure and there weren't any so it tells me it worked but there's nothing in the output.

Is that a limitation of not being licensed or have I likely overlooked something?


  • There is no limitation in eval mode, so there is something else at play here. I'd need to see code to make any further determination.
  • errorList = null$ zipPassword = null$ zipFileName = ".\html\rephr068.zip" ZipHandle = SRP_Zip("Open", zipFileName, zipPassword) noAttachments = DCount(attachmentList, fm$) Compression = 1 For aCnt = 1 to noAttachments thisFile = attachmentList<aCnt> OSRead filedata from thisFile then Result = SRP_Zip("AddFile", ZipHandle, thisFile, filedata, Compression) ; // compression can be 0-9. Defaults to 6 * If not(result) then errorList := srp_zip("GetLastError"):fm$ * end end Next aCnt SRP_Zip("Close", ZipHandle)
  • Nothing stands out. What happens if you use a different compression level?
  • I started with the default of 6 and only changed it to 1 to test that same theory.
    So 1 and 6 had the same result
  • Is the list of attachment files full paths? If so, that could be a problem. I don't think zip files can accept drive letters, though I'd hope you be getting an error if that were the case.
  • You were on the right path there Kev. (no pun intended......... well maybe).
    As I looked into that I realised the zipping was working and the files were getting added. The size of the resulting zip file indicated as much. It was just when I went to look at it, Windows explorer told me it was empty.
    The files that were being added were paths ".\somefolder\filename.png" and Windows had a problem with that.

    So no error because the zipping worked but Windows didn't like it.
    Change the filenames to well, just the filenames and everybody's happy.

    The AddFile doco states that you can use file paths or at least subdirectory info to distinguish between different files and technically that's correct because the AddFile still works but Windows doesn't like the output. Perhaps an actual file compression tool would be more accepting.

    Thanks for looking into it.
  • Now that issue is sorted, here's the next one that I hope you're going to assure me is just the licensing.
    The first time I call srp_zip("Open".... the license window pops up. All good.
    Run the routine again, a Windows error pops up instead of the License message.

    Run a third time, OI closes.

    Restart OI and application. Repeat above steps and symptoms.
    1. I understand, pay the licence, message disappears.
    2. Looks like same resolution, as the caption does mention License Window Error
    3. Is this just an extension of the previous two?

    Here's what the error logs say

  • I've created a new build that has more robust license windows, which you can download here. That being said, as you pointed out, once you get the license, the issue will go away.

    I'm glad you found the issue with the zip being empty. Strange that the ZIP file accepted the resolved paths rather than erroring out. You can have subdirectories, but you can't start the path with drive letters or periods.
  • Beauty. Thanks.

    Well whilst I didn't try to extract them, GetFileList knew what I had added and the zip file was of the right size to indicate they were there, just Windows couldn't read them.
    Googling indicated that other people have had similar experiences when programmatically creating zips and that they were able to extract using actual compression tools, just Windows explorer didn't like them, depending on the contents of the filename.

    So I think the zipping is ok and the utility works as designed. Windows explorer is just a little fussier.
Sign In or Register to comment.