Downloading a file with certain text

Advertisement

SMaxTH
Joined:
Posts:
3

Downloading a file with certain text

I'm trying to download from an SFTP Server. The file that I want to download is in one big folder, each day a new file is being added, the old ones are not deleted though.
The problem is that I only want to download the new file in a different folder than the old files.
This is the script I currently use:
open sftp://user:password@sftp-server
synchronize local c:/folder/download/today /sftp-server/files/FILE.zip
Now the "file.zip" has the current date in its name, but that's not the only thing, it also has other letters and numbers in it that don't change from the older files. Example:
Filename_YYYYMMDD_Versionnumber.zip
How can I tell the script to only download the .zip file that has the current date (Format: yyymmdd) in its name? I tried adding
*%TIMESTAMP#yyyymmdd%
at the point of
FILE.zip
but that didn't seem to work.

I searched around in the documentation but couldn't find anything that really helped.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,390
Location:
Prague, Czechia

Re: Downloading a file with certain text

I believe you want to use this:
get /sftp-server/files/*%TIMESTAMP#yyyymmdd%*.zip c:\folder\download\today\

Reply with quote

Advertisement

You can post new topics in this forum