Hi,
We wanted to set a filename into a TFileExist component and we don't know how to do it:
We've try that: context.rep_local+"ANATTAET.*.txt"
We've try that: context.rep_local+"ANATTAET*.txt"
And that did'nt work. The filename change all the time and we cannot specify a specific filename (unfortunatly)
Thx for your help
- Use an "Interate Row" to connect tFileList_1 and tFileExist_1 (since you gave a wildcard expression in Filemask setting for tFileList_1)
- make sure that the setting for Directory in tFileExist_1 is a valid Directory
Hi,
you could try to set the following
context.path + Numeric.random(0,100) + ".txt" .
In the File components guide at :
you'll find an example (worth reading 😞
Scenario: Checking for the presence of a file and creating it if it does not exist
BR Marcus
It seems you are using wrong file name format. the way you specified it will not work with this component, you can better use tFileList FTP then compare file list with source files.
Assuming you use a tFileList component ... add a Filemask like "ANATTAET*.txt" and then in your tFileExist component use ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) as your File name/Stream
Thank you for your answer but when I tried I get the following error:
Démarrage du job FtpCheck_by_RC a 16:44 04/12/2014.
connecting to socket on port 3566
connected
Exception in component tFileExist_1
java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at gate.ftpcheck_by_rc_0_2.FtpCheck_by_RC.tFileExist_1Process(FtpCheck_by_RC.java:1866)
at gate.ftpcheck_by_rc_0_2.FtpCheck_by_RC.tFileList_1Process(FtpCheck_by_RC.java:1782)
at gate.ftpcheck_by_rc_0_2.FtpCheck_by_RC.tServerAlive_1Process(FtpCheck_by_RC.java:803)
at gate.ftpcheck_by_rc_0_2.FtpCheck_by_RC.runJobInTOS(FtpCheck_by_RC.java:5935)
at gate.ftpcheck_by_rc_0_2.FtpCheck_by_RC.main(FtpCheck_by_RC.java:5791)
disconnected
Job FtpCheck_by_RC terminé à 16:44 04/12/2014.
- Use an "Interate Row" to connect tFileList_1 and tFileExist_1 (since you gave a wildcard expression in Filemask setting for tFileList_1)
- make sure that the setting for Directory in tFileExist_1 is a valid Directory