Topic "How to open the last modified folder"

Author Message
whatever61

Guest


Hello all,

I am preparing a script that will download the latest backup to my PC from my SFTP.

I manage to get to the folder with the backups, but there the folder structure is like that:

BACK_17_03_2014
BACK_18_03_2014
BACK_19_03_2014

What I want is to open the LATEST folder (from there I will do "get *.*", that's no problem).

If that's not possible then I want to copy all the files from inside the folders with a specific filemask.
Example inside the folder BACK_17_03_2014, BACK_18_03_2014 and BACK_19_03_2014 there's a file called "xxx.rar", so I want to get all the xxx.rar files.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
See https://winscp.net/eng/docs/script_download_most_recent_file#using_winscp_scripting
_________________
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