Solved

FTP Variable Help, FTP Voyager or Plain FTP Script

Posted on 2013-06-27
3
644 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Script to modify multiple files in Ubuntu / CentOS 2 51
AD user acount change history 4 64
Moving RDP Server to New Server. 3 45
VBA Shell can't Find Word document 11 74
Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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

16 Experts available now in Live!

Get 1:1 Help Now