ftp in batch

This is a discussion on ftp in batch within the C++ Programming forums, part of the General Programming Boards category; how do you use ftp in a batch file?...

  1. #1
    Unregistered
    Guest

    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
    Posts
    5,789
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    This is the help from my win95 machine

    Code:
    > 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.
    -s seems like a good bet

  4. #4
    Unregistered
    Guest

    batch ftp

    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

  5. #5
    31173 h4x0r gnu-ehacks's Avatar
    Join Date
    Nov 2001
    Posts
    556
    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

  6. #6
    Unregistered
    Guest
    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
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    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 Cprogramming.com
    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 Cprogramming.com
    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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21