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

How to list file names from an FTP in another file?

izzy_babcock
New Contributor II

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.

image

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!

1 ACCEPTED SOLUTION

@izzy.babcock

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

View solution in original post

8 REPLIES 8

SpiroTaleski
Valued Contributor

@izzy.babcock

I am attaching sample pipeline that may helps you:

CommunityTask_2021_10_07.slp (6.0 KB)

Regards,
Spiro Taleski

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?

image

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?

image

Thanks in advance.

Best,
Izzy Babcock

@izzy.babcock

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

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 $.