Topic "Copy files"

Author Message
router343

Guest


I have 3 files that i want to copy from AIX server to local drive every night automatically. the file names all end with the current day example post.db.bank.fri.20171006 and pre.db.bank.fri.20171006 The script i have pulls the 3 files that start with post and the 3 files that start with pre from the current date. i just want to copy the 3 files that start with post. I have attached the script and an image of the files in the directory. Like i said the script works, but i just want the 3 post files.
Image.JPG (18.19 KB) Private file

Description: (none)

script.txt (259 Bytes) Private file

Description: (none)

martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
So use post* mask.

Code:
get post* -filemask=*>=%TIMESTAMP#yyyy-mm-dd%


Note that your code does not download files that end with current date, but files that have modification timestamp from the current date. What may in the end do the same, I just wanted to make sure understand that.

To download files that start with post and ends with current date use:

Code:
get post*%TIMESTAMP#yyyy-mm-dd%
Advertisements

You can post new topics in this forum

Search

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