Pick the latest file

Advertisement

kishoremcp
Joined:
Posts:
2
Location:
India

Pick the latest file

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

Reply with quote

Advertisement

kishoremcp
Joined:
Posts:
2
Location:
India

Re: Pick the latest file

martin wrote:


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!

Reply with quote

martin
Site Admin
martin avatar

Re: Pick the latest file

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.

Reply with quote

Advertisement

You can post new topics in this forum