Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I 'm making a job to copy and rename files. My tfilecopy seems to copy and correctly rename the files.
Sadly files are created with good name but they're empty.
Files are 0 ko in good destination repertory...
here's a screenshot of the job : no error ... I don't understand what I have missed.
File copy don't, delete original file, for testing I don't think it was important, I only need copy and rename file not yet delete
Hi,
Please give full file path instead of file name from tFileList
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
This will help to get the source file properly.
If you are picking the file name from lookup flow only, then you will have to store the directory path also there.
Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
if I put
"/home/phii/Documents/renommer" instead
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
no files match in Tmap (like Talend doesn't find file name from source repertory). so nothing happens in TFilecopy
Hi,
Why don't you give like below in your tfilecopy
"/home/phii/Documents/renommer/"+ok4.document_name
I am assuming that your source directory is constant. If it is different, then you will have to pass the full file path also as part of tFlowtoIterate as additional column and assign below value.
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Sorry perhaps I don't have enough skill
If I use :
"/home/phii/Documents/renommer/"+ok4.document_name
I have this message :
The source File "/home/phii/Documents/renommer/AS_Metro_STRAS_FL_2017_10_23.pdf" does not exist or is not a file.
because in source repertory the file don't have the same name (I want to rename it with tmap inner join).
you are swap source and target - this is why several time you was asked to attach screenshot of component, as suggested by @nthampi
source file -
((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
target folder -
"/home/phii/Documents/renommer/"
target name:
ok4.document_name
Hi,
Don't worry. Lets go back to basics. Please try the below instructions.
Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
I finally find solution with your help.
here's where I make mistake : I have to rename here the screenshot if someone have same lake of experience about Talend like me
Thank you for your help, I learn a lot about file management in Talend! )
step by step...
Job works but files are limited to 20,1ko and are unreadable
file and name are ok but files content are corrupted...
If you have an Idea...
I pull the files via ascii. Switched it to binary to fix the corrupted files.
ok it seems to work fine now