Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 678
  • Last Modified:

FTP Variable Help, FTP Voyager or Plain FTP Script

Hi all. I have 2 files that get created on a UNIX server just before midnight. I am setting up a FTP Voyager job to grab those 2 files around 12:05 am. The job needs to grab those 2 files but I tried to use variables filename%Y%d%m.txt. Only problem is those variable are the current date when the files are created just before midnight and named filename20130626.txt. The job fails of course. The remote folder is filled with files. Is there a variable to tell it yesterday's day? I'm not good with FTP scripts but is there any easy way to tell the FTP Voyager job to run a batch that has code to grab that yesterday's date file or latest file with the .txt extention? I hope I explained that good enough.
0
Iused2kno
Asked:
Iused2kno
2 Solutions
 
DOSLoverCommented:
Here is a useful link: http://en.wikipedia.org/wiki/Date_(Unix)

YesterdaysDATE=$(date -d yesterday +"%Y%m%d")
0
 
AlexPaceCommented:
Here is a Robo-FTP sample script that makes a wildcard pattern based on yesterday's date and then downloads files that match the pattern: http://kb.robo-ftp.com/script_library/show/45

I know that isn't exactly what you were asking for but maybe it will give you an idea.
0
 
Iused2knoAuthor Commented:
Thanks both for your input. You both led me in a good direction.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now