Thread: ftp in batch

  1. #1

    ftp in batch

    how do you use ftp in a batch file?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    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

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    This is the help from my win95 machine

    > 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
      -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.
      - mget and mput commands take y/n/q for yes/no/quit.
      - Use Control-C to abort commands.
    -s seems like a good bet

  4. #4

    batch ftp

    use ftp -s:host.ftp

    contents of host.ftp:

    cd pub
    cd software
    get filename
    put filename

  5. #5
    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


  6. #6
    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.

  7. #7
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. batch file introduction in multiprocesses program
    By c_geek in forum C Programming
    Replies: 0
    Last Post: 03-27-2008, 01:52 PM
  2. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  3. Batch / FTP
    By bobothesmart in forum A Brief History of
    Replies: 1
    Last Post: 05-31-2002, 03:50 PM
  4. Auomating FTP in Windows 98 using Batch files?
    By bobothesmart in forum A Brief History of
    Replies: 1
    Last Post: 05-31-2002, 03:36 PM
  5. Batch File / FTP Client?
    By bobothesmart in forum Windows Programming
    Replies: 1
    Last Post: 05-31-2002, 12:01 PM