Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I am trying to automate a series of FTP commands so that i can hand a job over to someone not technically minded! These are the FTP commands I am currently using:ftp 100.100.100.100
username
password
cd folder1/folder2
binary
put c:\temp\Test.txt
quitThis succesfully transfers the test file but on splitting it into a batch file and FTP script the logon just goes into a loop.
Batch file:
ftp -n -s:FTP.txt 100.100.100.100
FTP.txt:
username
password
cd folder1/folder2/
binary
put c:\temp\test.txt
quitAny help would be appreciated.
Cheers."Whats wrong with the cat?" - Mrs Schrödinger
"Whats wrong with the cat?" - Mrs Schrödinger

Try this bat:
:==
@echo off> ft.do echo o 100.100.100.100
>> ft.do echo username
>> ft.do echo password
>> ft.do echo bin
>> ft.do echo cd somedir
>> ft.do echo put somefile.txt
>> ft.do echo byeftp -s:ft.do
::==M2
If at first you don't succeed, you're about average.

Thanks M2 but I'm still getting the same problem. If I run the script it creates a temp file called ft.do and opens a command window but that's it!
If I remove all of echo references I can see that the logon seems to have gone into some sort of loop again.
Any ideas?
"Whats wrong with the cat?" - Mrs Schrödinger

I usually run it from a CMD prompt, but just for drill I tried clicking on it.
Works OK.
Beats me why yours doesn't.
M2
If at first you don't succeed, you're about average.

Thanks for all your help M2,
I'm guessing that it is just a problem with the network settings ...or the firewall ...or with windows in general. I can feel lots of testing coming on.Cheers
"Whats wrong with the cat?" - Mrs Schrödinger

![]() |
Generate list of network ...
|
programmer's editor
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |