10-06-2021 08:20 AM
Hello snapLogic Community!
I am very new to the solution, but loving it more each day 🙂
I am trying to read the name of files from an FTP directory and write the details to a separate file within the pipeline project folder.
I checked this post’s response, but this is listing assets in the SnapLogic environment, and I am looking to list the name of all files in an FTP location and print out the name of the files to a csv file or json.
Does anyone have any suggestions on how I can accomplish this?
Thank you in advance!
Solved! Go to Solution.
10-07-2021 07:14 AM
Once you run the pipeline, the file is stored in the same project space where the pipeline is located. You can download the file, and the data will be in human-readable format.
The Directory Browser Snap on the output in the $Name it references the Name of the file on that location.
Regards,
ST
10-07-2021 05:46 AM
I am attaching sample pipeline that may helps you:
CommunityTask_2021_10_07.slp (6.0 KB)
Regards,
Spiro Taleski
10-07-2021 06:50 AM
Hi @Spiro_Taleski,
Thank you for sharing this sample pipeline with me.
When I run it (after updating it so it reflects my files), the result is an .xlsx with binary content, but I thought that the file writer would read binary and write it as document to the endpoint. Am I missing something?
Also, how do you know that $Name references the name of the file in a directory? How do I know what can be referenced as a variable/field for a specific snap?
Thanks in advance.
Best,
Izzy Babcock
10-07-2021 07:14 AM
Once you run the pipeline, the file is stored in the same project space where the pipeline is located. You can download the file, and the data will be in human-readable format.
The Directory Browser Snap on the output in the $Name it references the Name of the file on that location.
Regards,
ST
10-07-2021 11:01 AM
Thanks @Spiro_Taleski, after looking at the output generated by the snap, I was able to identify the column names being generated by the tool, which are the ones I can refer to with $.