Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
abhi90
Creator II
Creator II

Archive FileName with Sysdate

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

@rhall@TRF@vboppudi@manodwhb

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

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.

View solution in original post

13 Replies
TRF
Champion II
Champion II

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.

abhi90
Creator II
Creator II
Author

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

TRF
Champion II
Champion II

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.

abhi90
Creator II
Creator II
Author

Hi @TRF@rhall,

 

FileArchive is working. But When I am putting that in ts3Put It is not working

TRF
Champion II
Champion II

So what, compilation error or runtime error?

Which error, do we have to guess it?

abhi90
Creator II
Creator II
Author

Compilation error it is.I have attached it 


ts3Put.JPG
abhi90
Creator II
Creator II
Author

TRF
Champion II
Champion II

Where are you using this?

Share the component settings with le line of code as it appear in it.

abhi90
Creator II
Creator II
Author

In ts3Put. Using the same FileName as in tfilearchive.Attached it. @TRF


ts3Put_BasicSettings.JPG