One Star

Issue with deleting all files from a folder with tFTPDelete

Hello,

 

I'm kind of rookie with Talend things, and I want to delete all files from ftp folder. I'm using tFTPDelete component:

 

- When I use "*.*" as filemask, it raises exception => I suspect this is because filepattern  matches the ".." pseudo file (parent dir)

- When I use "*.???" as filemask, it works for any file having 3 digits length, and no exception is raised. => But I want to delete any file, with suffix of any length, or no suffix at all.

- When use regular expression "^(?!([.][.])$).+$", it deletes some files but not all files. => That regular expression aims at matching all files but ".."

 

I'm running out of idea Smiley Sad How can I delete all files from ftp folder, whatever the filenames are ?

 

Any help would be greatly appreciated

 

Regards

Tags (1)
1 REPLY
Ten Stars

Re: Issue with deleting all files from a folder with tFTPDelete

You can use combination

tFTPList -> Iterate -> tFTPDelete

-----------