How to capture file name of a file read from SFTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2020 10:05 PM
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.
Regards,
Darshita

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2020 08:58 PM
@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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2020 11:43 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2021 02:03 AM
Thank you! I was able to get this done with the help of directory browser snap.
