Results 1 to 5 of 5

Thread: ZIP to data/time stamped file fails

  1. #1

    Default ZIP to data/time stamped file fails

    Hi,

    I am using this to get the date/time from the main exe in the install:
    #get file info (File Date/Time [ISO 8601 Format]) from
    "C:\Pstellar\rap_install8\Mservice.exe" into "[MODUL_DATO_ISO]"

    And then to zip some files:
    #zip file from "d:\MariSoft\*.*" to
    "d:\3rdParty\MariSoft\MariSoft_Unilink_[MODUL_DATO_ISO].zip" [Recurse]
    [Relative] [Post-compile]

    But the last command fails, since we cannot have this filename:
    d:\3rdParty\MariSoft\MariSoft_Unilink_2022-06-02T07:45:12.zip

    How can I remove the colons from the variable [MODUL_DATO_ISO], or get
    another date/time stamp that is acceptable.

    Tia
    /Poul

  2. #2

    Default Re: ZIP to data/time stamped file fails

    Hi Poul,

    On 6/1/2022 23:06 PM, Poul Jensen wrote:
    > How can I remove the colons from the variable [MODUL_DATO_ISO], or get
    > another date/time stamp that is acceptable.

    What I use is @d10- for dates and @t04- for time. Check the help on
    "Time Pictures"

    But if you just need to remove the colons, then a few lines of code
    should work:

    I BYTE
    L BYTE
    CODE
    L = LEN(MODUL_DATO_ISO)
    LOOP I = 1 TO L
    IF MODUL_DATO_ISO[I] = ':'
    MODUL_DATO_ISO[I] = '-'
    END

    Best regards,



    --
    Arnor Baldvinsson
    Icetips Alta LLC

  3. #3

    Default Re: ZIP to data/time stamped file fails

    Thanks Arnor,

    I should have been more clear on this, because I need to do this within
    the Setupbuilder script.

    /Poul

  4. #4

    Default Re: ZIP to data/time stamped file fails

    Found a solution:

    Called the script with the date/time stamp on the command line:
    sb10.exe /C "MobilService11.sbp" /CV MODUL_DATO_ISO "20220602_191500"

    /Poul

  5. #5

    Default Re: ZIP to data/time stamped file fails

    Hi Poul,

    On 6/2/2022 11:06 AM, Poul Jensen wrote:
    > I should have been more clear on this, because I need to do this
    > within the Setupbuilder script.

    Ah, of course, I thought I was in comp.lang.clarion<g> Never mind

    Best regards,


    --
    Arnor Baldvinsson
    Icetips Alta LLC

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •