How to capture file name of a file read from SFTP

How can we capture the name of the file picked up from the SFTP if we are reading multiple files at a time?

Eg: sftp://path/*.csv

I need to know which file each document belongs to.

Appreciate the help.


@Darshita Use directory browser snap,it will provide you all necessary details about the file. Then use another child pipeline and pass file path/filename to read file. To track the processed filename, can use level in Pipeline Execute snap.

See the attached example.CS-Binary-addFileNametodata_2020_11_30.slp (7.9 KB)
If you read the file, then use the Binary Router, you can get the filename, put that out on a second output, as document type, and then join that to the data.