how do you use ftp in a batch file?
how do you use ftp in a batch file?
I have the Win2K version... I dont think you can script it.....
For the help, type FTP. Then HELP....this will give you command info, but if you type FTP and something after it, it tries to connect so I dont know if it can be scripted.
P.S. To get out of FTP, type QUIT
This is the help from my win95 machine
-s seems like a good betCode:> ftp -h Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host] -v Suppresses display of remote server responses. -n Suppresses auto-login upon initial connection. -i Turns off interactive prompting during multiple file transfers. -d Enables debugging. -g Disables filename globbing (see GLOB command). -s:filename Specifies a text file containing FTP commands; the commands will automatically run after FTP starts. -a Use any local interface when binding data connection. -A login as anonymous. -w:buffersize Overrides the default transfer buffer size of 4096. host Specifies the host name or IP address of the remote host to connect to. Notes: - mget and mput commands take y/n/q for yes/no/quit. - Use Control-C to abort commands.
use ftp -s:host.ftp
contents of host.ftp:
open 192.168.1.1
anonymous
password
cd pub
cd software
binary
get filename
put filename
quit
Good question. It might be possible, but why would you want to?
What will people say if they hear that I'm a Jesus freak?
What will people do if they find that it's true?
I don't really care if they label me a Jesus freak, there is no disguising the truth!
Jesus Freak, D.C. Talk
-gnu-ehacks
I had to once. I ran an Internet Provider. I had an accounting server that produced a radius user file every 10 minutes. I then had to get it out to the radius server, So I made a batch file to ftp it and scheduled it with a cron daemon. When ever some didn't pay their bill, within minutes they could not sign on. Also let me add new users on the fly.
You could make a simple MMORPG with FTP. My friend at school did. What he did is he had a big file that had the positions of all logged on members in the world. And he had a file that had all the status info of each character. Every loop, the game downloads both files, then updates everything. Then there is a chat file, but he didn't get the feature where there is shouting and regular talk. He made it where when you say something, everyone hears it. When you chat, it changes the file of chat, when the chat file changes, it displays the message in everyone's client. It was kinda laggy since you had to download those files EVERY loop. He should have made it every other loop, it would've sped it up, but someone could also pk you without you knowing it, if you skipped loops, so I guess he did it well. That is kinda hoe MMORPGs run. Except they aren't supposed to run off of ftp servers.