cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP Adapter - File name extension on lowercase or uppercase

jcabral
Explorer
0 Kudos

Hi everyone.

I'm working with this adapter and I need to get .pdf files from certain folder, but these .pdf can exist with its extension either lowercase or uppercase. I've tried different things (expressions, regular expressions, or, ||, and more) and none of it worked so far.

Is there any way to achieve this functionality?

In the image below, adapter retrieves the file only if the extension is lowercase... and as I don't manage that aspect, the file could be saved on SFTP in uppercase, and the adapter would never retrieve it.

Thanks in advance.

Kind regards,
Juan

Accepted Solutions (1)

Accepted Solutions (1)

donepuna
Advisor
Advisor
0 Kudos
jcabral
Explorer
0 Kudos

Thanks Nagesh... I was coming to that conclusion but it's nice to have it confirmed.

Do you know if this feature is going to be added to the adapter?

Answers (2)

Answers (2)

sapnoob99
Explorer
0 Kudos

try replacing the word "pdf" to "*"

${property.filename}.*

jcabral
Explorer
0 Kudos

Hi Wesley, thanks for your reply!

I wouldn't have a problem with that... is just that the folder can also contain files with the same name but other extensions.

Example:

a.pdf
a.xml
b.PDF
b.xml

Etc.

PriyankaChak
Active Contributor
0 Kudos

Hi Juan,

Have you tried with below regex exp?

^(pdf|PDF)$

Regards,

Priyanka

jcabral
Explorer
0 Kudos

Thanks Priyanka, I've just tried your answer, but it is still not working.

Maybe the filename field does not take regex into account?

PriyankaChak
Active Contributor
0 Kudos

Hi Juan,

Because of combination of camel expression and regex expression, it is not working probably.

jcabral
Explorer
0 Kudos

Also tested with regex only (no combination), but didn't work.

I'll state the obvious but maybe wasn't so obvious... this is SFTP Adapter from Cloud Integration. I assumed it accepts regular expressions, but maybe I'm wrong?

PriyankaChak
Active Contributor
0 Kudos

I assumed also the same. As per Nageswara's confirmation, no support for regex yet. Only the wildcard characters can be used.