Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts

    Batch programming with ftp

    I want to create a batch file that will log into a ftp server and grab some files. I want be able to pass an argument to the batch file that will tell the ftp program what files I want.

    example
    c:\> myBatchFile *.html

    will get all the .html files from the server.

    myBatchFile looks like this:
    Code:
    ftp -i -s:login.txt
    and the file login.txt looks like:
    Code:
    open 127.0.0.1
    username
    password
    cd
    /usr/var/html
    now where do I put in the argument I want to pass from the command line so the program will get the *.html files?

    If I add a line like
    mget %1 to the batch file it does nothing
    same if I add it to the login.txt file.

    Any ideas?

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •