Expand my Community achievements bar.

SOLVED

File Listing in File Transer Activiy

Avatar

Level 3

What exactly does File Listing do?

derekw42533281_1-1699905063799.png

 

I can't see the file in the server. Even when I select 

derekw42533281_2-1699905199105.png

"List All Files" in the advance options in the protocol doesn't do anything.

 

Am I missing something?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

What it means is that you can use the value $(vars/@filenames) in an enrichment to get all the file names from your file transfer (separated by '\n', as newline). 

 

Please note that if the total number of chars from your enrichment is above 255, it will trigger an error.

You can still use the function GetLine to extract a specific filename (for example : GetLine($(vars/@filenames),1) will get you the first filename listed.

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @derekw42533281 ,

File listing: allows you to list the files present on the server defined in the Protocol tab. This action is mainly used for debugging purposes, to check if the activity is configured according to your needs before downloading the files from the remote server.

List all files: this option is available when selecting the File listing action in the General tab. It allows you to index all the files present on the server in the vars.filenames event variable in which the file names are separated by the ‘n’ characters.

Avatar

Level 3

@ParthaSarathy 

That's what documentation says but the "List all files" needs to be clearer. That's what I'm having issues with understanding. 

 

What exactly does this mean? 

"files present on the server in the vars.filenames event variable in which the file names are separated by the ‘n’ characters."

 

Can you show and example of how this works?

Avatar

Correct answer by
Level 2

What it means is that you can use the value $(vars/@filenames) in an enrichment to get all the file names from your file transfer (separated by '\n', as newline). 

 

Please note that if the total number of chars from your enrichment is above 255, it will trigger an error.

You can still use the function GetLine to extract a specific filename (for example : GetLine($(vars/@filenames),1) will get you the first filename listed.

Avatar

Level 3

Thank you! 

 

I'v used almost every activity to view them! Just not enrichment.

 

Thank you again! 

Avatar

Level 3

I'll test this in a bit and let you know if I have any questions.