Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
jmd
Contributor
Contributor

tFTPFileList : how to know an entry is a directory

Hi,
I use a tFTPFileList to get files from a FTP server
But there is a subdirectory in the directory listed
=> this subdirectory is considered as a file and generates an error when the job tries to work with this folder as if it was a file
Do you know how to test the type of the element brought by the tFTPFile List ?
Thanks in advance
Labels (2)
18 Replies
Anonymous
Not applicable

Hi,
To avoid this problem, I propose you to add a mask like "*.gz" for example in your tFTPFileList file mask area 0683p000009MACn.png

Best regards,
Stéphane
jmd
Contributor
Contributor
Author

Thanks but it's not possible as the files to list don't have any extension
Anonymous
Not applicable

I used the component tFTPFileList with the mask "*.*" and it worked for me : the component lists all files with extension, but no directory.
Best Regards,
Stéphane
Edit : Sorry, my files have extension, but not yours! This post didn't answer correctly to your question!
Anonymous
Not applicable

Hi jmd,
Uncheck the option 'File details', it will not list the directories, but only files. For more information, please read the component online manual
https://help.talend.com/search/all?query=tFTPFileList]tFTPFileList&content-lang=en
Best regards
Sabrina
jmd
Contributor
Contributor
Author

I tried that but "File details" option completely changed the values returned in the ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")) variable returned by the component and it can't be treated correctly (date & time of the file is added in the name of the file)
Anonymous
Not applicable

I tried that but "File details" option completely changed the values returned in the ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")) variable returned by the component and it can't be treated correctly (date & time of the file is added in the name of the file)

Sabrina meant to unselect the 'File details' option.
Shong
jmd
Contributor
Contributor
Author

it's unchecked by default and it still returns directory entries
Anonymous
Not applicable

Hi
Which version are you using? I tested this issue on v5.2.1 and it don't returns directory entries.
Shong
jmd
Contributor
Contributor
Author

5.2.0
I don't think there is a difference in 5.2.1