Solved

FTP Variable Help, FTP Voyager or Plain FTP Script

Posted on 2013-06-27
3
639 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks both for your input. You both led me in a good direction.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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…
This video discusses moving either the default database or any database to a new volume.

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now