Announcement

Collapse
No announcement yet.

Automated FTP run by HS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Automated FTP run by HS

    I have w2k and want to get a script that will ftp files from PC to webserver and have HS handle the scheduling.

    Can someone get me started with a command line (best way ??) that HS can execute.

    Maybe O/S command line is not the best ...searching HS archives ....ftp from a script ??

    Thanks in advance

    [This message was edited by Richard G on Wednesday, 01 January 2003 at 07:29 PM.]
    HS3 Standard Edition 3.0.0.258

    #2
    There are a couple of scripts in the archive you might look for. Here's the example in the HS help -

    Example:



    sub main()



    dim s

    dim host

    dim user

    dim password

    dim command

    dim rfile

    dim lfile

    dim path



    host = "homeseer.com"

    user = "anonymous"

    password = "user@company.com"

    command = "get"

    rfile = "remote_test.htm"

    lfile = "c:\remote_test.htm"

    path = "pub"

    ' get the file

    s = hs.ftp(host,user,password,command,path,lfile,rfile)



    end sub

    Comment


      #3
      You can also script the FTP client that's built into Win2K using the command line "ftp -s:filename"

      The file should contain a list of FTP commands you want to execute in order (including the username and password). Something like this:

      open ftp.somehost.com
      username
      password
      cd dirname
      hash
      put file.html
      binary
      ren file.gif old.gif
      put file.gif
      delete old.gif
      bye

      Comment

      Working...
      X