Click to See Complete Forum and Search --> : Batch File To connect to an FTP site and Download a specific file by name


mao
06-01-2006, 09:30 AM
I need some help on this simple task...

I have an FTP site where I have a folder that contains files that are named by the date it was created.

example of files on the ftp site.

AB060106.txt
AB053106.txt
AB053006.txt
AB052906.txt........

I need to download the file that was created the day before so if today is June 1st, then I need to download the file named AB053106.txt

What I need is the sript command that indicates which file to download, so that I can put it in my FTP.txt file that is executed by a batch file FTP.cmd.

ray326
06-02-2006, 12:38 AM
What operating systems are involved? With a decent shell you can "calculate" the name, create and execute the FTP file on the fly. Otherwise you may want to consider driving the whole process with Perl.