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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Automated FTP Script

  • 02-10-2003 11:46am
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,013 ✭✭✭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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 4,839 ✭✭✭Hobart


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


Advertisement