ftp batch file
Results 1 to 6 of 6

Thread: ftp batch file

  1. #1
    Registered User pmetal's Avatar
    Join Date
    Oct 2000
    Location
    Stafford, VA
    Posts
    354

    Post ftp batch file

    I'm wondering if it is possible to create a simple batch file on NT that would ftp to a server, logon, put a file, and logoff. I would then want to have it run automatically every evening. Any ideas would be appreciated.

    (mods, if this is not the right forum, please move it and let me know.....thanks)

    peace

  2. #2
    Registered User
    Join Date
    Aug 2000
    Location
    st louis mo
    Posts
    108

    Post

    hmmm not sure if it will work but you could try


    ftp <<ftp.dat

    where ftp.dat looks like

    open <site name or ip address>
    user <login name>
    pass <password>
    cwd etc
    cwd <where you want the file to go>
    bin <~ you should know what this does
    put Filename.ext

    then just use the at command to fun ftp <<ftp.dat at the specified time

  3. #3
    Registered User pmetal's Avatar
    Join Date
    Oct 2000
    Location
    Stafford, VA
    Posts
    354

    Post

    drewber,
    thanks, but it didn't work. the problem is, that once it connects to the server, the batch file no longer has control, and i have to manually put in my logon info. i'm starting to seriously doubt this is even possible. probably a good thing, security wise, but it would be nice to be able to do it. thanks again for the post.

    any more ideas?

    peace

  4. #4
    Registered User pmetal's Avatar
    Join Date
    Oct 2000
    Location
    Stafford, VA
    Posts
    354

    Post

    for those that are interested, i figured it out. i created a batch file with the following line in it:

    ftp -s:filename ip address

    filename = a simple text file with commands i wanted issued, including ID and Password, then Put, etc...

    it's amazing what one can do when they read the help files

    see ya

  5. #5
    Registered User ShadowKing's Avatar
    Join Date
    Dec 1999
    Location
    WA
    Posts
    743

    Post

    Thanks for posting the solution. That way it helps everyone.

  6. #6
    Registered User pmetal's Avatar
    Join Date
    Oct 2000
    Location
    Stafford, VA
    Posts
    354

    Talking

    No prob, Shadow

    that's why we're all here. i learn a lot just from reading all the posts, and it's a little annoying when someone finds the solution and doesn't bother to tell the rest of the class. ya know?

    anywho, i hope it helped somebody

    take care

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
  •