Topic "Download last item in a list"

Author Message
jmjones8
[View user's profile]

Joined: 2014-03-05
Posts: 5
Location: Fairbanks
I am trying to figure out how I can download the last file in a list automatically when I won't know the name of the file. An example of the list is:

SIR_20140616_2345.png
SIR_20140616_2345_geo.tif
SIR_20140616_2345_masked.png
SIR_20140616_2349.png
SIR_20140616_2349_geo.tif
SIR_20140616_2349_masked.png
SIR_20140616_2353.png
SIR_20140616_2353_geo.tif
SIR_20140616_2353_masked.png
SIR_20140616_2357.png
SIR_20140616_2357_geo.tif
SIR_20140616_2357_masked.png

I just need to know how to single out the last file for downloading. Thanks for your help.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
See this similar example for inspiration:
http://winscp.net/eng/docs/script_download_most_recent_file
_________________
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