Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

FTP Variable Help, FTP Voyager or Plain FTP Script

Posted on 2013-06-27
3
Medium Priority
?
671 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 750 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 750 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

971 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