FTP

  • Thread starter Thread starter Guido
  • Start date Start date
G

Guido

Guest
I am using the built in ftp command in Windows XP to connect to a Unix Server
ih the same network subnet.

When I start ftp and the ip address of the server it asks me for a user name
and password which I type in and it works fine.

I am trying to write a series of commands into a batch file and I would like
to include the user name and password within the batch file so that the user
is not prompted for them.

Is there a way to do this.

Your help would be appreciated.

Regards,

Guido
 
Re: FTP


"Guido" <Guido@discussions.microsoft.com> wrote in message
news:EAD3649F-9137-4DBB-A6DA-6726057382BD@microsoft.com...
>I am using the built in ftp command in Windows XP to connect to a Unix
>Server
> ih the same network subnet.
>
> When I start ftp and the ip address of the server it asks me for a user
> name
> and password which I type in and it works fine.
>
> I am trying to write a series of commands into a batch file and I would
> like
> to include the user name and password within the batch file so that the
> user
> is not prompted for them.
>
> Is there a way to do this.
>
> Your help would be appreciated.
>
> Regards,
>
> Guido
>


You could use this batch file:
@echo off
set site=ftp.xxx.com
set account=guido
set password=SomePassword
set script="%temp%\script.scr"

echo> %script% %account%
echo>>%script% %password%
echo>>%script% binary
echo>>%script% get SomeFile.doc
echo>>%script% quit
ftp -s:%Script% %site%
del %script%
 
Re: FTP

Guido <Guido@discussions.microsoft.com> wrote:

>I am using the built in ftp command in Windows XP to connect to a Unix Server
>ih the same network subnet.


>I am trying to write a series of commands into a batch file and I would like
>to include the user name and password within the batch file so that the user
>is not prompted for them.


Look here: http://www.nsftools.com/tips/MSFTP.htm for a very complete
discussion of the command-line FTP client. Using the -s:xxx command
switch will tell it to read the file and execute the FTP commands
within it. By combining a *.cmd file to invoke FTP with a file int he
-s option, you can make the FTP command do what you want.

--
Tim Slattery
MS MVP(Shell/User)
Slattery_T@bls.gov
http://members.cox.net/slatteryt
 
Back
Top