Folder Actions or AppleScript - a little help please?

Discussion in 'Mac Programming' started by Mudbug, May 30, 2007.

  1. Mudbug Administrator emeritus

    Mudbug

    Joined:
    Jun 28, 2002
    Location:
    North Central Colorado
    #1
    I tried to write this short to make it concise, and failed, so here's the long version.

    I have a simple little website that I've built using RapidWeaver - it's hosted primarily on an external web server and I've successfully been able to ftp files to it for a long time with no issue. That site links via RW's "iFrame" pages to folders on my local Mac which I've set up via Apache to serve pages out to the web.

    I know - pretty smart... but...

    I set up a dynamic dns account to track my local mac on the off chance my IP would change - with Time Warner, that pretty much never happened. Now that Comcast cable has moved into town and is constantly changing my dynamic IP address, I can't keep the connections live for long. Once the IP changes, it takes a good while for the dyndns links to update in the DNS server, so the pages may not link up right for decent stretches at a time.

    The point of all this is that I'm serving out client proofs of a few thousand individual files that can change at the drop of a hat due to client corrections and changes. Add to the confusion, they are proofs for multiple clients in multiple cities, sometimes having names that are relatively the same.

    What I want to do is this: I want a folder action set up that will make it so that any file (they're all .pdf files, if that helps) saved into a certain folder will automatically get uploaded to a corresponding folder on my hosted web space, replacing any older file with the same name that may have already been uploaded in the past. I've been through google searches and found a few options, none of which are working the way I think they should, so I'm getting confused. Is there a simple way to accomplish what I'm after? I'm sure there someone out there with some incredible AppleScript Kung Fu that can do it, but I'm not that guy.

    I guess I basically want a backup script that moves only the new or the changed files to an offsite server, which just happens to be my web server. All the while I want it to leave alone the files that didn't change. Make sense?
     
  2. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #2
    No. :p

    What are the steps you want this script to take?
    Something like this?
    1. Files are dropped into a specified folder.
    2. These files will be uploaded to your web server (into a folder of the same name as the folder they where dropped into?). You'd have to ftp these, right?
    3. When uploading theses files they will over write any duplicates.
     
  3. macfaninpdx macrumors regular

    Joined:
    Mar 6, 2007
    #3
    Automator action?

    Have you considered making a little Automator Action to attach to a folder? You will need something like this to add support for FTP.
     
  4. Mudbug thread starter Administrator emeritus

    Mudbug

    Joined:
    Jun 28, 2002
    Location:
    North Central Colorado
    #4
    Yeah, that's it in a nutshell. All via FTP. Although to make it all really nice to me, I'd like it if I could just save the file to the folder instead of drag/drop it once it's made.

    And as for the automator action, I want it to be immediate, and automatic, instead of me having to either provide input or it only run once/twice a day. I thought about that, though, making an iCal event to run the automator action for me to keep me from having to do anything, but that's more tedious than I want.
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    Doesn't Transmit do this already? or some other FTP program? I've seen it before.
     
  6. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #6
    Interarchy can sync folders...
     
  7. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #7
    I just found the how-to for synchronizing local folders -> remote directory with Transmit. Seems straight forward. Also Transmit has Automator actions for doing some of this too it seems.

    Mudbug, I'd go with one of these apps. Don't waste yours (or someone else's) time on writing a script when it's already been done.
     
  8. Mudbug thread starter Administrator emeritus

    Mudbug

    Joined:
    Jun 28, 2002
    Location:
    North Central Colorado
    #8
    thx folks - I've been a fetch user for years and have been fairly comfortable with that for the longest time, but I guess it's probably time to move up to Transmit. I've heard good things, I guess I'm just a tightwad... :D

    I'll update my findings/outcome once I'm up and running.

    thanks for the input.
    Mud
     

Share This Page