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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
AndyBrown
Contributor
Contributor

tFileArchive Behavior

I'm new to Talend as of 2.3.2 and was attempting the following simple scenario:
1) Fetch a number of files with tFTPGet (this part was successful)
2) After successful completion, use tFileArchive to zip up the five txt files into one archive using a date-time stamp.
Upon execution, I'm experiencing the following exception:
Starting job GetFiles at 14:09 20/05/2008.
Exception in component tFileArchive_1
java.io.FileNotFoundException: C:\Documents\Manufacturers\ACME\ACME Data Stage\ACME_Data_2008-05-20.zip (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at texasinstruments.getfiles.GetFiles.tFileArchive_1Process(GetFiles.java:294)
at texasinstruments.getfiles.GetFiles.tFTPGet_1Process(GetFiles.java:219)
at texasinstruments.getfiles.GetFiles.runJobInTOS(GetFiles.java:447)
at texasinstruments.getfiles.GetFiles.main(GetFiles.java:361)
Job GetFiles ended at 14:12 20/05/2008.
I was under the impression that tFileArchive creates the archive file on the fly. According to the exception it appears as though the archive has to exist beforehand. There is no documentation on tFileArchive as of the latest components guide, nor can I find it anywhere.
Any guidance would be appreciated.
Labels (3)
14 Replies
Anonymous
Not applicable

Hello andybrown
Yes, you are right. Currently, it will throws exception if the folder doesn't exist. I have reported a 3855.
To avoid this problem, you should create the folder first and select it in TOS.
Best regards
shong
AndyBrown
Contributor
Contributor
Author

Hello andybrown
Yes, you are right. Currently, it will throws exception if the folder doesn't exist. I have reported a 3855.
To avoid this problem, you should create the folder first and select it in TOS.
Best regards
shong

Thanks for the response. Did you mean "it will throw the exception if the 'archive' file doesn't exist"? The folder "ACME Data Stage" actually does exist in my scenario. It is the file named "ACME_Data_2008-05-20.zip" that does not exist. I just want to make sure that is what you meant.
Regards.
Anonymous
Not applicable

Hello
Did you mean "it will throw the exception if the 'archive' file doesn't exist"? The folder "ACME Data Stage" actually does exist in my scenario. It is the file named "ACME_Data_2008-05-20.zip" that does not exist.

I mean it will throw exception if the archive file folder doesn't exist.(see the screenshot)
Best regards
shong
0683p000009MCG7.png
AndyBrown
Contributor
Contributor
Author

Hello
Did you mean "it will throw the exception if the 'archive' file doesn't exist"? The folder "ACME Data Stage" actually does exist in my scenario. It is the file named "ACME_Data_2008-05-20.zip" that does not exist.

I mean it will throw exception if the archive file folder doesn't exist.(see the screenshot)
Best regards
shong

Got it. Thanks.
_AnonymousUser
Specialist III
Specialist III

Hi,
How do i create a archive file with data time stamp automatically using the tfilearchive component. My component settings are:
Directory : "C:\Test\*.xls"
Archive File: "C:\Done\new.zip"
How do i get my component to zip file with data time stamp, so tht it doesn't overwirte the zip everytime i run this component.
Anonymous
Not applicable

Hello
How do i get my component to zip file with data time stamp, so tht it doesn't overwirte the zip everytime i

You can set the archive file name like this, for example:
"C:\Done\"+TalendDate.formatDate("yyyy-MM-dd HH-mm-ss",TalendDate.getCurrentDate())+" new.zip"

Best regards

shong
_AnonymousUser
Specialist III
Specialist III

ThankQ Shong.
Anonymous
Not applicable

Hi, How can I archive an individual file????? without the folder.
I have put some number of files in my folder and I want to archive the files in separate zip files.
Currently, in my knowledge, tFileArchive is only archiving the directory, right????
Thanks
Anonymous
Not applicable

Untick the All Files option and add the file masks for the files you want to zip.
The mask can be for a specific type of file:
"*.txt"
or and individual file:
"samplefile.txt"

Regards
Brandon