Solved

FTP Variable Help, FTP Voyager or Plain FTP Script

Posted on 2013-06-27
3
650 Views
Last Modified: 2013-06-27
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
Comment
Question by:Iused2kno
3 Comments
 
LVL 5

Accepted Solution

by:
DOSLover earned 250 total points
ID: 39281842
Here is a useful link: http://en.wikipedia.org/wiki/Date_(Unix)

YesterdaysDATE=$(date -d yesterday +"%Y%m%d")
0
 
LVL 16

Assisted Solution

by:AlexPace
AlexPace earned 250 total points
ID: 39282177
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
 

Author Closing Comment

by:Iused2kno
ID: 39283446
Thanks both for your input. You both led me in a good direction.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need script to search multiple files in one drive 13 45
Auto Login Script 3 40
SBS 2003 RWW Login 3 36
ifconfig 4 46
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question