Topic "Get the recent files of two different filename patterns."

Author Message
Kel.W

Guest


Hi Admin and all,

Hope you are doing well. I have an urgent question to ask..

I am new to use WinSCP. Recently, I am asked to download two files with different patterns from a remote directory via WinSCP. That directory contains files with naming like Fin_REPORT_100410.csv, User_REPORT_180410.csv, Asset_Report_100310.csv..etc. Obviously, the number are referring to the DDMMYY format... The files are generated weekly.

So, my question is... How can I use a script to get the latest files with only the pattern of Fin_Report_ and Asset_Report_ ?

Regards,
Kelvin
Advertisements
Kel.W

Guest


Anyone can help pls...?
Kel.W

Guest


I tried the example script - Downloading the most recent file. It works. However, it can only download only one file...

What I wanted to achieve is to download the most recent files with two different filename patterns in the same remote directory... The file names are as below:

1.) ABC_Report_120410.csv.Z
2.) DEF_Report_120410.csv.Z

So, the naming convention of the files is filename_DDMMYY where the DDMMYY is different by weekly based...

Could someone be so kind to help me out??

Regards,
Kel.W
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
So modify the script to obtain the latest files within sets of files matching either pattern.
_________________
Martin Prikryl
KEL.W

Guest


prikryl wrote:
So modify the script to obtain the latest files within sets of files matching either pattern.


Hi Prikryl,

Thanks for your reply. Would you mind to tell me what and where should I put into the example script to make this works? (Really need your help as I am not a tech guy... : ) )

Regards,
Kel.W
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
KEL.W wrote:
Thanks for your reply. Would you mind to tell me what and where should I put into the example script to make this works? (Really need your help as I am not a tech guy... : ) )

Sorry, I do not have a time to prepare scripts for you.
_________________
Martin Prikryl
WTH

Guest


prikryl wrote:
So modify the script to obtain the latest files within sets of files matching either pattern.


This answer deserves a medal for the most useless answer I've seen in a while... The OP states that he doesn't know how to do that and this whole thread is about "HOW", and you simply tell him that he should *DO* it without explaining *HOW*? Heck, I came here from google hoping to find a *HOW*, not this dumb answer...
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