PDA

View Full Version : ZIP to data/time stamped file fails



NewsArchive
06-06-2022, 11:59 AM
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

NewsArchive
06-06-2022, 11:59 AM
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

NewsArchive
06-06-2022, 12:00 PM
Thanks Arnor,

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

/Poul

NewsArchive
06-06-2022, 12:00 PM
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

NewsArchive
06-06-2022, 12:00 PM
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