using ftp commands

How can I use the get command to retrieve a file with the latest date?  there multiple files that look like this  with a date as part of the file:   HQ_FILENAME_03312010.    
cbest846Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cbest846Author Commented:
In my question, I forgot to add this information.  I am ftp'ing from a windows server 2008 to an ftp server.
thanks.
0
Steve KnightIT ConsultancyCommented:
Is the date format a known one, i.e. is the file always yesterdays date or todays date etc. as you basically have two methods
1. Format the filename yourself locally and the do a GET command to get it using date handling on the Windows end.
2. Take a directory listing of the remote end and get the relevant file from the list.

#1 is probably easier if it gives you the file you want.  You can get the filename right using techniqies like these:

http://www.experts-exchange.com/articles/OS/Microsoft_Operating_Systems/MS_DOS/Using-dates-in-batch-files-scripts.html

and then put that into an ftp script using these:

http://scripts.dragon-it.co.uk/links/batch-ftp-scripting

We can stitch it together if you tell us a bit moe about the file dates .
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cbest846Author Commented:
the files are sent to the ftp server by the client every day. each file has this format that contains the date it was sent --   filename example,  HQ_FILENAME_03312010.    (file ends with period) sent on 3/12/2010.   the script should run every day and pull down today's date file and copy it to same name with extension .zip.  Once in the windows directory, it would be unzipped and processed
0
cbest846Author Commented:
Thank you
0
Steve KnightIT ConsultancyCommented:
I missed your response back for some reason, sorry - wasn't ignorng the Q.  Thanks for selecting my answer but if you need any more help just click on "ask a related Q" and we can carry on.

Steve
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
File Sharing Software

From novice to tech pro — start learning today.