AutoFTP


This tool will help you automatically upload file to the designated FTP servers. It was made for my own use as I have to manage a CMS development. The changes to the code in office need to be uploaded on few sites via FTP. After spending lot of time in uploads or using bpftp (bulletproff ftp) to monitor source directory i failed to get impressed.

What all autoftp can do (aka features):

  • Supports Ignore list
  • An ignore list, added most recently, will ignore all files that match the pattern. Can be extensions or anything. the whole ignore text is send to perl's regex.
  • Supports multiple destination FTP servers
  • the source directory is locked as a constant in the perl script itself. The destination can be a list of FTP directories. The paths given are taken as base there(remotely) as well as here (locally). So it locally if you base path is T:\cms and at server it is /public_html/manager, file modified in T:\cms\includes\lib.php will get uploaded to /public_html/meneger/includes/lib.php.
  • Preserves FTP connections
  • This is a experimental feature and somewhat buggy. I need to make adjustments to 1) check return values after upload calls, 2) keep connection "alive" using any FTP activity like chdir,etc. otherwise, this feature saves a lot of time.
  • Scans entire source directory tree
  • The scanner goes and scans the whole source directory tree and compares dates from its last scan and current for changed file. It will then upload that file to the FTP server no matter what level deep it finds the file.
  • Uploads to relative paths from source to destination
  • Remembers the source timestamp for next run
  • What I fails to do (aka TODOs):

  • Uploading in a binary mode
  • Images are therefore in ignore listr since right now it uploads everything in text mode. It needs to be smart in switching the mode of transfer depending on the file type.
  • Server based independent cache It has once timestamp cache for all servers. At times I had to comment a particular server from the config so it does not upload files to that server. The problem is that after some time when i turn it on, that server will be left behind from other server as cache maintained by the autoftp script is applicable to all server.
  • Little Interactivity Its not at all interactive after it starts running. It will only display what it iis doing and closing it with Ctrl-C is the only way to stop it. Im planning to add some tricks like Pause, Skip particular server in the next cycle, Quit, Wait Longer, etc. The input would be comming from standrd input at all times.
  • Preprocessing What if, some files or parts of it are not required by a particular server while other part is required only by another server. Im trying to bring in a preprocessor into the script which will read the file with C-like preprocess directives and create a final copy of the file for each ftp server.
  • Downloads

    [autoftp.rar] [autoftp.tar.gz]


    200508092102:vikas
    Its free software, do whatever style.
    Copyright © 2005, Vikas Yadav, India