FTP

G

Guido

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
 
P

Pegasus \(MVP\)

Guido said:
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%
 
T

Tim Slattery

Guido said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

I can't connect to ftp server with ftp.exe 19
FTP question... 7
automate FTP 3
Batch FTP 4
Need help with ftp script 3
FTP/Firewall problems on XP Pro 1
WINXP Search ignores some files 3
Emulated DOS FTP script ? 2

Top