frenny
26th December 2016, 06:54
Hello Experts,

My requirement is to zip entire folder .i have tried to use infor zipfile.build in -built function but it is returning -2.
I have also tried the example given in proguide of LN for zipfile.build but same result.

Here is my code (same as proguide example):

zipfile = bse.dir$() & "\bin" & "\eXtend" & "\applic\" & "myzipfile.zip"

| add selection to zipinfo
handle = zipinfo.new(zipfile)
if handle = 0 then
message("Error while creating new zipinfo")
endif

ret = zipinfo.add(handle, "test", TFILE)

| archive zipinfo to target
result = zipfile.build(handle)
if result <> 0 then
message("Error while building zipfile")
endif

| clean up
zipinfo.delete(handle)

i have also tried rar.exe using run.prog command but that compressed some random temp file then actual file in zip folder.

Thank you,
frenny

bdittmar
26th December 2016, 12:17
Hello,
have a look at :

http://www.baanboard.com/baanboard/showthread.php?t=69227&highlight=zipfile.build

Regards

oirfeodent
26th December 2016, 19:37
Hello Experts,

My requirement is to zip entire folder .i have tried to use infor zipfile.build in -built function but it is returning -2.


-2 refers to Error ENOENT - No such file or directory.

Validate the presence of file.