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