cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Curly brackets in filename

Sahil
Contributor

Hi,
I am using Multi File reader snap but is not picking correctly filename if it has curly brackets.
filename is like: abcd{334-ffg-gg}.xml

How to handle these kind of schenarios.

17 REPLIES 17

@Sahil,

If you are trying to get the name of the file in the child pipeline, you can pass the content-location header. I donโ€™t know where are you reading the file from, but if itโ€™s SLDB, the header value should look like this:
image
And if you want to get the filename only, you can use this expression: $['content-location'].split("/")[$['content-location'].split("/").length - 1] this will return the name of the file.
image

Did you check โ€œcontent-dispositionโ€. its coming wrong there.

Yes I did check it, it is coming like you said with "_" instead of {}
image
Thatโ€™s why I said you can use the content location to get the filename.

Hi,
In the child pipeline I have directory browser and after that I have a mpper to collect file size($[โ€œSize (in bytes)โ€]), date($[โ€œUpdate dateโ€]), path ($Path)
and all are coming null.

And what is the search criteria in the directory browser ? What value do you pass in there ?