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 ?