Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a directory where n number of File is present. Now I want to to archive all of them in a Single Archive Zip File in format like this Sysdate_SomethingName.zip. I am trying with below in Archive FileName Path but getting compilation Error:
context.ROOT_SRCFILEDIR+"J3/DIGITAL/SPEND"+"/"+J3_DIGITAL_ACTUAL_SPEND_routines.TalendDate.getDate("yyyyMMddHHmmss").zip. Can anyone please help
Try this one (take care of ".zip"):
context.ROOT_SRCFILEDIR+
"J3/DIGITAL/SPEND"+"/"+
J3_DIGITAL_ACTUAL_SPEND_routines.TalendDate.getDate("yyyyMMddHHmmss")+
".zip"
or
context.ROOT_SRCFILEDIR+
"J3/DIGITAL/SPEND"+"/"+
TalendDate.formatDate("yyyyMMdd_HHmmss",TalendDate.getCurrentDate())+
".zip"
Hope this helps.
Try this one (take care of ".zip"):
context.ROOT_SRCFILEDIR+
"J3/DIGITAL/SPEND"+"/"+
J3_DIGITAL_ACTUAL_SPEND_routines.TalendDate.getDate("yyyyMMddHHmmss")+
".zip"
or
context.ROOT_SRCFILEDIR+
"J3/DIGITAL/SPEND"+"/"+
TalendDate.formatDate("yyyyMMdd_HHmmss",TalendDate.getCurrentDate())+
".zip"
Hope this helps.
Hi @TRF,
Thanks for your reply. That is working in tfilearchive. Now when I am putting the context.ROOT_SRCFILEDIR+"J3/DIGITAL/SPEND"+"/"+TalendDate.formatDate("yyyyMMdd_HHmmss",TalendDate.getCurrentDate())+"_J3_DIGITAL_SPEND.zip" in ts3put FilePath some compilation error is coming
Which one?
You may click on the "Code" tab then click on red rectangle in the right margine to locate the compilation error into source code. And finally, click the cross in the left margin to get the error description.
So what, compilation error or runtime error?
Which error, do we have to guess it?
Where are you using this?
Share the component settings with le line of code as it appear in it.