Hi Rony,
I will have another look at this - the missing directories - for the
next version although anyone other than the three of us should never
encounter it :-).
Ad using errorlevel: my goal has been to make the least number of
modifications as possible to the tools being used but rather to "wrap"
them up as is. So I chose to "call" the fop.bat script from fo2pdf.cmd,
passing it the required arguments. It does not set an errorlevel when it
runs, merely invoking java and then returning. So the calling program -
fo2pdf - has no indication of whether it ran successfully or not. I
could do some checking for the existence of the PDF file before and
after and whether their timestamps were different I suppose if that
would be worth the effort or maybe just eliminate the message! I'll take
a look for v2.
Gil B.
On 3/2/2020 8:35 AM, Rony G. Flatscher wrote:
Dear Gil,
On 02.03.2020 14:09, Gil Barmwater wrote:
I definitely should have made that more clear for you and Rony. I,
too, ran into that issue as I mentioned in my post when Rony stumbled
over it. As I said then, the problem arises because I could not
include the empty folders in the zip file. They only need to be
created once so I did not want to do the test for them on every run,
hence putting their creation in the "housekeeping" section of
docprep. Of course, we all had previously run version 1 so the
"housekeeping" section never ran in v1.1, causing us all problems. So
sorry for the grief!
Maybe always checking for the existence as P.O. proposes and create
the directories if needed would really be the way to go. This strategy
would always work, independent of the state the users are in. (As the
computers have become so fast, as a user one does not realize/"feel"
those three checks.)
Also one more thing: the pdf creation does not work, if the pdf file
exists already and is being viewed (hence the pdf file cannot be
deleted, overwritten); in such a case the script ends with the wrong
message that the pdf file got created. Maybe errorlevel can be used
[1] [2] to determine whether a command ran successfully or not?
I will have a go at the HTML creation later today.
Toi, toi, toi!
Best regards
---rony
[1] "Errorlevel and Exit codes": <https://ss64.com/nt/errorlevel.html>
[2] "Batch file return code":
<http://www.trytoprogram.com/batch-file-return-code/>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
--
Gil Barmwater
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel