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

Automated FTP Script

Options
  • 02-10-2003 12:46pm
    #1
    Registered Users Posts: 4,839 ✭✭✭


    Firstly sorry if this the wrong area for this, but I could'nt find a area more suitable for this post.

    I have googled for the right FTP software with this functionality, but I cannot seem to find it. What I need is the following:

    A batch file that will run continuously which will:
    1) Poll a directory waiting for files with a .PDF extension.
    2) Move the file/files to another directory
    3) Login to an FTP site with UN/PW
    4) Send the files
    5) Move the files to another Directory
    6) Log that the files have been sent, by means of a txt file.


    I have tried to use the Dos/Win32 built in FTP client but I have to admit defeat. Anybody outhere can help? I fell like banging my head against a wall!!!!


Comments

  • Registered Users Posts: 1,994 ✭✭✭lynchie


    If the machine is running windows, best bet is to install cygwin, so you can run unix scripts. It will be a lot easier to do it that way than using M$ batch files


  • Registered Users Posts: 207 ✭✭BlueDrax


    I've batch files that do something very similar, except they only run once a day.
    I use a scheduler program to run them, which can be configured to run them once a minute.
    PM me and I'll send you a copy.

    Patrick.


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    You could schedule the batch file execution in Control Panel\Scheduled Tasks if you're using Windows 2000. Dunno if XP has it but it will have its equivilant.


  • Registered Users Posts: 4,839 ✭✭✭Hobart


    Thanks for the replies. I am not worried about the timing of the transfers, as I can get the batch file to run itself again and again. I could also use the AT command. The issue I have is that I have to automate the transfer and moving of the files from one directory to another.


  • Registered Users Posts: 95 ✭✭fractal


    Hey there,

    I have just the script for you... :) Friend of mine wrote it on co-op... Install generic ActiveStage perl for windows and you're away.. http://www.activestate.com/

    Check out the script at:www.skynet.ie/~fractal/ftp.txt

    does pretty much what you want...

    Put the ftp commands eg:

    open ftp://sitename.com
    mput *
    bye

    in file commands.txt and you're away.. Tis set up to go from multiple directorys but Im sur eyou can figure your way around that..

    DISCLAMER: Dont come crying to me if this doesnt work 100% the way you'd like. :)


  • Advertisement
  • Registered Users Posts: 4,839 ✭✭✭Hobart


    Thanks again for all your help on this. Bluedrax actually supplied me with the solution.


Advertisement