FTP in batch file

Associate
Joined
16 Mar 2004
Posts
1,899
Location
Oxford
I'm trying to get a file to copy to my web space through FTP using a batch file, I have managed to get this to work by manually typing this into the command prompt, however when this is put into a batch file it doesn't work:

Code:
ftp
open
hosting2.123-reg.co.uk
(username)
(password)
cd test
put c:\test.txt

What changes do I need to do to get it to work?
 
Associate
OP
Joined
16 Mar 2004
Posts
1,899
Location
Oxford
Thanks for your help, I'm having a few problems with this though, the first issue is that it just scrolls the first line constantly and does nothing, so you end up with this:

ftp.JPG
 
Associate
Joined
24 Aug 2003
Posts
317
Make 2 files up

File 1 is the batch file which should read something like this.

Code:
ftp -i -s:ftp-script.txt

File 2 is the FTP script file (ftp-script.txt) and should be something like this

Code:
hosting2.123-reg.co.uk
FTPUserName
FTPPassword
cd test
put c:\test.txt
bye
 
Last edited:
Back
Top Bottom