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.
If you are trying to FTP multiple files with a dynamic file name then you will need to use scripting.
No, FTP does not support TLS/SSL
Scripting is an option
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