ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

idea connect to a ftp server

<< < (3/3)

sizzle:
Same result the file that is created on the desktop is empty.

I managed to get a look at what's going on in the DOS window. It appears that the bat.file is connecting to the server and the user is logged in but when the echo binary line executes the message
Aborting any active data connections.... connection closed by remote host appears. Then we get a cmd line that says not connected.

I've tried moving this line down after get file.......I've tried taking it out and it always disconnects after the user is logged in. I know we are connecting to the server and the password is being accepted and the user is logged in, all of these things appear in the DOS window.

Any idea what's going on?

sizzle:
OK here's the solution.
the line echo cd StoreFiles needs to be changed to:

echo cd StoreFiles>>script.ftp

What was happening was the script was not changing to the "storefiles" directory and the script was unable to find the specific file to download. Now it changes to the proper directory and downloads the proper files.

Thanks for your help guys.

MilesAhead:
Another way to create a batch right off the command prompt is to use copy con filename command.  Then just type in the lines you want "filename" file to contain.  When done, press ^z and you will get the command prompt back. Just avoids all that file append business.  The copy command will do it for you.

It makes it a bit easier to see what you've typed.  Or just using a text editor is probably best.  I usually use EditPadLite and save the file just leaving the editor open.  When I run it and get an error, I can just edit the file and save again until I get it right.  Running the batch just reads it so it doesn't care if EditPadLite already has the file open.

scancode:
Another way to create a batch right off the command prompt is to use copy con filename command.  Then just type in the lines you want "filename" file to contain.  When done, press ^z and you will get the command prompt back. Just avoids all that file append business.  The copy command will do it for you.
-MilesAhead (October 05, 2009, 03:39 PM)
--- End quote ---

The file appending thing is because I like to keep my scripts in a single file :P
You can also make them in notepad and call ftp.exe -s:script.txt ;)

MilesAhead:
I don't understand.  All I'm saying is if you do copy con filename every line you type will be in "filename" file until you press ^z.  How you execute only a section of a batch file I don't comprehend.

Navigation

[0] Message Index

[*] Previous page

Go to full version