Topic "Pick the latest file"

Author Message
kishoremcp
[View user's profile]

Joined: 2015-01-28
Posts: 2
Location: India
Hi,

I have a SFTP where files will be posted on a periodical basis. We do not know when they will be placed there. I want only the latest files among the files existing in SFTP.

I am using WinSCP with the below argument and can anybody modify it for me so that it picks the latest file among those files in SFTP?

Regards,
Kishore
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25019
Location: Prague, Czechia
See https://winscp.net/eng/docs/script_download_most_recent_file
kishoremcp
[View user's profile]

Joined: 2015-01-28
Posts: 2
Location: India


I am using the below argument in SSIS which i want to be modified.

/console /command "option batch abort" "option confirm off" "open ABC" "get -filemask "*.txt >1d"" "exit"

This is working and picking the files but not the only file which is latest among those files existing but all the files.

Please help!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25019
Location: Prague, Czechia
There's no simple trick to make you one-line command to do what you ask for. See the link in my previous answer for a solution.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License