eWON Flexy FTP date and filename

,

Hi, I am trying to set up weekly FTP dumps to our server. The FTP itself works fine but I have a couple of questions.

I am using the planner to do weekly FTP dumps every sunday 11.30pm

  1. Does the Flexy FTP support TLS/SSL

  2. How can add I multiple files for multiple EBD commands, it always appears as 1 file name, and only includes data from the first EBD command

I’ve tried seperating with commas and semi-colons but still appears as 1 file and only 1st line of EDB

  1. How can I automatically add the date to the filename, so I don’t have to rename the files manually, so it might say Load_Act_Pow01Mar18.csv for example.

Thanks

@tomcs123

If you are trying to FTP multiple files with a dynamic file name then you will need to use scripting.

  1. No, FTP does not support TLS/SSL
  2. Scripting is an option
  3. Scripting is an option

We can use the ONDATE in the init section that will go to a label/section that will parse the time string and perform a PUTFTP for each EBD.

In this example, I am FTPing 2 files every sunday at 11:30 PM with dynamic filenames.

InitSection
ONDATE 1, "30 23 * * SUN", "GOTO SendData" // Every Sunday at 11:30 PM

SendData
SendData:

T$ = Time$
year$ = T$(7 To 10)
mon$ = T$(4 To 5)
date$ = T$(1 To 2)
hour$ = T$(12 To 13)
min$ = T$(15 To 16)
sec$ = T$(18 To 19)

A$="filename1"+T$(1 To 2)+"-"+T$(4 To 5)+"-"+T$(7 To 10)+".csv"
B$="filename2"+T$(1 To 2)+"-"+T$(4 To 5)+"-"+T$(7 To 10)+".csv"
PUTFTP A$,"[$dtHL $ftT $st_d1 $et_s0 $tnTestTag]"
PUTFTP B$,"[$dtHL $ftT $st_d1 $et_s0 $tnTestTag2]"

END

I used the following hms.how topic as reference:

1 Like

Thanks a lot! That worked perfectly and was easy to read and understand so I can modify it to my requirements.

I have 12 tags that I’m publishing through FTP every week, I noticed after about 5 consecutive PUTFTP calls, the scheduled task buffer gets full.

Easy workaround is use a counter and timer and cycle through 1 per timer cycle.
I ended up doing 1 tag every 3 seconds with no problems.

Cheers

1 Like