SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple ftp batch ??

    I want to write simple ftp batch file that will send automatically my file from my machine to my ftp.server. The basic script is like this:

    ##########################################333
    :do
    ftp -s:newftp.txt <server ip>




    :done
    echo transfer


    ############################################33
    and the newftp.txt is:

    <username>
    <password>
    put C:\test.rar
    :done
    Bye


    ################ I want to see the status of sending file Ė like hash marks, or percentage. ########## But I donít know what to put in the script. If someone has any suggestions, please let me know. Thanks

  2. #2
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got the thing just for you. I had to write it last week for my church. And it displays hash marks
    Put the following in a .bat file
    Code:
    ftp -s:ftp_do.ftp hostname
    And then put the following in ftp_do.ftp
    Code:
    username
    password
    bin
    hash
    ascii
    prompt
    mput test.rar
    close
    quit

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    re

    what if i want to select folder by my self ?
    like user wants to describe folder before batch will start its job.
    is it something with %my_file% ?? <-- where to put it??

  4. #4
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't understand your question fully. So you want to upload different folders?

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2006
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    re

    yes

  6. #6
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well thats slightly harder. You would need a for loop in the batch script to process the files. And I have no clue on how to do that.


Bookmarks

Posting Permissions

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