[tFileCopy] Log details on files copied

Seven Stars

[tFileCopy] Log details on files copied

Hello folks,


I have 2 environments, namely qualification and recette

Contexts are configured for each one of them


The last part of my job simply copy files from one folder to another on the same machine.





When i run on qualification, all the files are copied successfully but on recette nothing has been copied.

context.archiveSentDir + context.currentDateTime + "/" has already been tested; i have retrieved the file path and it looks good.







Is there a way i can check what is wrong?

Or how to use the global variable of tFileCopy component?




Thank you for your help.


Best regards,


Five Stars

Re: [tFileCopy] Log details on files copied


The global variables can be used exactly the same way you used the ((String)globalMap.get("tFileList_2_CURRENT_FILEPATH")) in your tFileCopy component.

For exemple, you can use them in a tJava to display the values (use the autocompletion to have the correct name) :
System.out.println("destination directory: "+((String)globalMap.get("tFileCopy_1_DESTINATION_DIRECTORY")));

In order to debug your issue, you add a tJava somwhere (for exemple, you can replace the tFileCopy with a tJava) and use it to print some debug information such as:
System.out.println("current file: "+((String)globalMap.get("tFileList_2_CURRENT_FILEPATH")));

This code should display the current file of the tFileList loop when you run your job.

If you cannot see the previous log, try displaying others tFileList variables in order to ensure they are correct:
System.out.println(context.archiveSentDir + context.currentDateTime);

If you see the log, the problem must be on the tFileCopy component.

You can also check that the job iterates on your tFileList (it should show the number of iteration when started from the studio).