Also note that you might not need a batch-file, check out ftp -h for the
information about a response file, the -s option.

You might also be interested in the ncftp client (new version released
yesterday!), the ncftpget programme is very neat.
http://www.ncftpd.com/ncftp/


-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------



| -----Original Message-----
| From: Mike Kear [mailto:[EMAIL PROTECTED]
| Sent: Thursday, January 08, 2004 08:39
| To: CF-Talk
| Subject: OT: Need help with Batch file
|
| Here's one for some of you older fellas, who still remember DOS:
|
|
|
| I need  some help with a batch file for using FTP.  (I can't
| use CFFTP, because it fails at the change to directory - the
| directory we want includes a space in the name and no matter
| how I try it won't include the space as part of the name)
|
|
|
| The commands I'm having trouble with is the get or mget.  I
| don't know the exact file name I need to retrieve because it
| contains the date.  The filename will always be in the form:
| p_mth_choice_mag_ddmmmyyyy_nnnnnn.zip
| where dd is the date, mmm is the month, yyyy is the year, and
| nnnnnn is a serial number of some sort.  So I was hoping to
| have the ftp file use get or
| mget to retrieve p_mth=choice*.zip.
|
|
|
| When I do this using manual commands,  get doesn't work
| because it doesn't support wildcards, but mget does.  However
| mget wants a "y" confirmation for each file.  How to I put in
| the batch file to answer Y?
|
|
|
| Here's the batch file I've written so far:
|
|
|
| ftp -d -s:C:\Inetpub\wwwroot\project\ftpconfig.txt ftp.comain.com.au
|
|
|
| And the ftpconfig.txt file contains the following:
|
|
|
| username
|
| password
|
| cd "Custom extracts\ ourfolder "
|
| lcd "\inetpub\wwwroot\project\files"
|
| mget p_mth_choice*.zip y
|
| quit
|
|
|
|
|
| But this fails because it hasn't got any "Y" response to the
| prompt.  I know there's a way to have the batch file submit
| the "Y" to the script but I'm at a block.  Can't remember how
| to do it, and my old DOS manuals went in the recycle bin years ago.
|
|
|
| Can anyone help?
|
|
|
| Cheers
|
| Mike Kear
|
| Windsor, NSW, Australia
|
| AFP Webworks
|
| http://afpwebworks.com
|
|
|
|
|
|
|
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to