Copy files

Advertisement

router343
Guest

Copy files

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)
  • script.txt (259 Bytes, Private file)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Copy files

So use post* mask.

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:

get post*%TIMESTAMP#yyyy-mm-dd%    

Reply with quote

Advertisement

You can post new topics in this forum