Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

FTP and batch files

  • 26-05-2000 1:24pm
    #1
    Closed Accounts Posts: 60 ✭✭


    Folks

    Seeing as I'm not that adept at writing batch files, could someone volunteer a solution for the following:

    A batch file that connects to an ftp server, supplies a password and username,Change dir and then PUT a file in the current path..

    Any help appreciated.

    Fing


Comments

  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    you cant do that with DOS ftp.
    your stuck with something like wsftp unfortunaly..
    which is obviously not what you want.

    however it can be done quite easily with perl.. although ive never used the Net::FTP modules on a windows machine before

    http://www.filmsoc.com


  • Registered Users, Registered Users 2 Posts: 3,744 ✭✭✭deRanged




  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Originally posted by Kali:
    you cant do that with DOS ftp.
    your stuck with something like wsftp unfortunaly..
    which is obviously not what you want.


    Actually batch files can do that, and ws_FTP is extremly handy.

    If your just using the DOS FTP command you can pipe the commands from a text file.

    something like..

    FTP server < commands.txt

    Commands.txt would contain for example..
    username
    password
    binary
    cd /uploads
    put filename.txt
    quit


    However I recommend getting WS_FTP. You can use command line options with it (it's in the help). That way you can set up the server and send the stuff no problem.

    Also I recommend getting... AUTOMATE4
    http://www.unisyn.com/

    It has automation for FTP and other stuff. I use it all the time and it's made life a heck of a lot easier.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    I use a combination of Automate.

    This has a built in scheduler based on certain conditions (eg. After a certain time or a file appears in a directory).

    Once it kicks off it grabs the files, zips them up and creates a batch file which spawns multiple copies of WSFTP when sending.

    I orginally had DOS FTP but you have better control over whats sending with WSFTP Pro. Plus you get % bars.


  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    well **** me sideways with an extra large happy meal... nice link deranged

    hmm batch files. hmm. hmmmmmmmm.

    Ken.. learning is fun!



    http://www.filmsoc.com


  • Advertisement
  • Closed Accounts Posts: 60 ✭✭Fing


    Cheers for the info lads. Anyone know if you can use wildcards with the FTP PUT command?

    Fing


  • Closed Accounts Posts: 6,601 ✭✭✭Kali


    use MPUT for wildcards.

    http://www.filmsoc.com


Advertisement