Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BATCH file to Automate Upload of web site

Status
Not open for further replies.

Pistol

MIS
Jan 29, 2001
59
US
First off, I am not sure where to post this, but here it is: I am trying to get my hands on a batch file that will start explorer, or ftp software, then upload my site to it. I have a schedual program that will start the bat file, but I need the bat file to go to the site log on, and copy the files over.

Thanks in advance
 
I use an ftp script. First, a batch file like -

@echo off
cd ftp –i -v -s:c:\windows\scriptname ftpservername
exit

Then the script in the script name would be -

loginname
password
binary
lcd cd /targetdirectory
put filename (or mput filename wildcard)
qui


So you could just use a wildcard in a directory, and then everything you want uploaded you just leave in that directory.

Is this what you are after?


Dean Owen
 
i need to download a file from an public ftp server but keep getting asked for a password, is their any default password that i could try?

Cheers

Steve
 
No idea, sorry. Never used one.

Ya could try any webpages that are available to see if thye give instructions. Dean Owen
 
I am trying to download a file using the above method, i have made the code below:

anonymous
test@test.com
binary
cd data/pub/prokbdown
get prokb.zip
qui

When i run the batch file i get the message:

Command not implemented for that parameter.

Any ideas where i'm going wrong?

cheers

steve
 
does the ftp session even start? If not, the problems in your batch file, not the script file.

is test@test.com the password? Dean Owen
 
the ftp session starts but stops at the get command, this only happens on NT, windows 95 & 98 work fine.

yes that is the password, i am using m own one, but didn't want to put it on here.

cheers
 
I dont know enough about NT I'm afraid. More of a unix person.

Try running this thorugh command-line ftp in NT. It may be that NT simply has a different command.

Sorry I can't be more help.

Dean Owen
 
Sorry to take so long to respond to my original post. I've been working on different things here, but I eventually got the ftp batch to work with the above example, and some modification. Here is the final script for anyone else

OS:Win 2K SP1
2 Files: FTPload.bat
FTPtrans.txt
Path: Root (c:\FTPload.bat)


***********************************************************
(FTPLoad.bat)
@echo off
ftp -v -i -s:FtpTrans.txt 192.168.200.11
***********************************************************

(FTPtrans.txt)
UserName
Password
binary
cd fpdb
put "\\Us1fs1\Users\MclernPe\sites\Belimo Intranet\fpdb\Intranet Databse for employee Phone extensions.mdb"
qui
*********************************************************

Apparently the biggest issue was the order of (-v -i), the script would not run with the order reversed. Thanks for the help.

Peter McLernon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top