Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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\
SMaxTH

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.