Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
DVERSTRAETE
Contributor
Contributor

How to get last modified files from a FTP server

Hello,

I'm trying since few days to find a solution, but I didn't find answer anywhere...

I try to list the 2 last modified folder in FTP server.

So i have

tFTPConnection -> TFPFileList -> tFtpFileProperties -> tMap -> tSortRow -> tLogRow

I use tMap to convert date from mtime_string to date format. But I'm lost because, each folder is treated separatly... So my "tSortRow" doesn't work.

How can I make it work ?

Example of ouput :

.----------------------+--------------------+--------+----+----------+----------------------------+----------------.

|                          tLogRow_2                           |

|=---------------------+--------------------+--------+----+----------+----------------------------+---------------=|

|abs_path       |dirname       |basename|size|mtime   |mtime_string        |DateFormat   |

|=---------------------+--------------------+--------+----+----------+----------------------------+---------------=|

|/Séries/Quantum Leap/.|/Séries/Quantum Leap|.    |4096|1552464571|Wed Mar 13 09:09:31 CET 2019|13-01-2019 09:31|

'----------------------+--------------------+--------+----+----------+----------------------------+----------------'

.-----------------+---------------+--------+----+----------+----------------------------+----------------.

|                        tLogRow_2                        |

|=----------------+---------------+--------+----+----------+----------------------------+---------------=|

|abs_path     |dirname    |basename|size|mtime   |mtime_string        |DateFormat   |

|=----------------+---------------+--------+----+----------+----------------------------+---------------=|

|/Séries/Sliders/.|/Séries/Sliders|.    |4096|1552464730|Wed Mar 13 09:12:10 CET 2019|13-01-2019 09:10|

'-----------------+---------------+--------+----+----------+----------------------------+----------------'

Thanks you in advance.

Labels (2)
1 Solution

Accepted Solutions
DVERSTRAETE
Contributor
Contributor
Author

So,

 

I find a solution, I'm not sûre that's the best way to do it, but it works.

I've had to write it to find a solution.

 

tFTPConnection -> TFPFileList -> tFtpFileProperties -> tMap -> tBufferOuput

|

tBufferInput -> tSortRow -> tSampleRow

 

So I write in a buffer every information.

On tFtpFileList, I made a "On Subjob ok" connextion to tBufferInput and made my sort, and filter "0..5" in tSampleRow.

 

It works correctly !!

View solution in original post

1 Reply
DVERSTRAETE
Contributor
Contributor
Author

So,

 

I find a solution, I'm not sûre that's the best way to do it, but it works.

I've had to write it to find a solution.

 

tFTPConnection -> TFPFileList -> tFtpFileProperties -> tMap -> tBufferOuput

|

tBufferInput -> tSortRow -> tSampleRow

 

So I write in a buffer every information.

On tFtpFileList, I made a "On Subjob ok" connextion to tBufferInput and made my sort, and filter "0..5" in tSampleRow.

 

It works correctly !!