automate FTP

P

pete0085

I'm trying to automate a simple FTP batch script and when I run the commands
individually in the command prompt it's not sending over both files, only 1.
I have two "filename".zip files and it's only sending the first.

ftp ftp.server2.com
username
password
put s:\admin\folder\*.zip
quit
 
D

David H. Lipman

From: "pete0085" <[email protected]>

| I'm trying to automate a simple FTP batch script and when I run the commands
| individually in the command prompt it's not sending over both files, only 1.
| I have two "filename".zip files and it's only sending the first.

| ftp ftp.server2.com
| username
| password
| put s:\admin\folder\*.zip
| quit


Example done in KiXtart

SETCONSOLE("SHOW")
SETCONSOLE("MAXIMIZE")
SETCONSOLE("FOREGROUND")
Color y+/b
cls
$home="D:\local_folder"
$drive=left($home,2)
go $drive
cd $home
$FTPCMD="FTP-CMD.TXT"
Open (1,$FTPCMD,1)
Close(1)
Open (1,$FTPCMD,4)
WriteLine(1,"open server.name.com"+@CRLF)
WriteLine(1,"username"+@CRLF)
WriteLine(1,"password"+@CRLF)
WriteLine(1,""+@CRLF)
WriteLine(1,"lcd $home "+@CRLF)
WriteLine(1,"bin "+@CRLF)
WriteLine(1,"hash "+@CRLF)
WriteLine(1,"prompt "+@CRLF)
WriteLine(1,"put file.zip "+@CRLF)
WriteLine(1,"bye "+@CRLF)
Close(1)
cls
shell "FTP -s:$FTPCMD"
del $FTPCMD
 
P

Pegasus \(MVP\)

pete0085 said:
I'm trying to automate a simple FTP batch script and when I run the
commands
individually in the command prompt it's not sending over both files, only
1.
I have two "filename".zip files and it's only sending the first.

ftp ftp.server2.com
username
password
put s:\admin\folder\*.zip
quit

See the reply you received the the VB Script newsgroup, then have a look at
this site to see the merits of cross-posting vs. multi-posting:
http://www.blakjak.demon.co.uk/mul_crss.htm. Cross-posting is fine,
multi-posting causes duplication of effort.
 
B

Barry Schwarz

I'm trying to automate a simple FTP batch script and when I run the commands
individually in the command prompt it's not sending over both files, only 1.
I have two "filename".zip files and it's only sending the first.

ftp ftp.server2.com
username
password
prompt

put s:\admin\folder\*.zip

Use mput
 

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

Top