Re: Need help with Batch file

2004-01-08 Thread Dirk De Bock - Lists
I think you can issue the 'prompt' command before the mget, this enables or disables prompting for an mget download

so something like

username
password
cd Custom extracts\ ourfolder 
lcd \inetpub\wwwroot\project\files
prompt
mget p_mth_choice*.zip y
quit

good luck
- Original Message - 
From: Mike Kear 
To: CF-Talk 
Sent: Thursday, January 08, 2004 8:39 AM
Subject: OT: Need help with Batch file

Here's one for some of you older fellas, who still remember DOS: 

I needsome 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_ddmmm_nn.zip
where dd is the date, mmm is the month,  is the year, and nn 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]




RE: Need help with Batch file

2004-01-08 Thread Mike Kear
Thank you Dirk!That did the trick.Although a slight correction -
there's no need to add the Y response at the end of the next line.The
prompt command eliminates the need for a response.

I do appreciate your help. It's been a long time since I tinkered with batch
files.

Cheers

Mike Kear

Windsor, NSW, Australia

AFP Webworks

http://afpwebworks.com

_

From: Dirk De Bock - Lists [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 8 January 2004 8:12 PM
To: CF-Talk
Subject: Re: Need help with Batch file

I think you can issue the 'prompt' command before the mget, this enables or
disables prompting for an mget download

so something like

username
password
cd Custom extracts\ ourfolder 
lcd \inetpub\wwwroot\project\files
prompt
mget p_mth_choice*.zip y
quit

good luck
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Need help with Batch file

2004-01-08 Thread Hugo Ahlenius
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 AhleniusE-Mail: [EMAIL PROTECTED]
Project Officer Phone:+46 8 230460
UNEP GRID-ArendalFax:+46 8 230441
Stockholm OfficeMobile:+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 needsome 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_ddmmm_nn.zip
| where dd is the date, mmm is the month,  is the year, and
| nn 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]




RE: Need help with Batch file

2004-01-08 Thread Dave Watts
 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?

Before issuing your mget commands, issue the prompt command, which will
prevent mget from prompting you with each file.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]