Apple Script Writer Needed

Discussion in 'Mac Programming' started by Lightscap3s, Mar 14, 2018.

  1. Lightscap3s macrumors newbie

    Lightscap3s

    Joined:
    Mar 14, 2018
    Location:
    Carmel, IN
    #1
    Hello,

    I'm not real sure if this is the correct form, but if it isn't please let me know wheres the correct form.

    I'm in need of someone to write me quick and simple Apple Script, and I'm even willing to pay a few bucks via ApplePay text message or PayPal.

    - Otis
     
  2. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #2
    What do you want it to do, and does it strictly have to be an Apple Script, or can it be bash too?
     
  3. Lightscap3s thread starter macrumors newbie

    Lightscap3s

    Joined:
    Mar 14, 2018
    Location:
    Carmel, IN
    #3
    Yes, they need to be scripts for them to work through an application called ChronoSync.

    Essentially, the first script will run on a particular directory that has folders with a file in each folder. The script should permanently delete (purge) all folders and it’s contents that have created dates more than two days old from the current time and date the script is executed - always keeping the original directory folder path in place.

    The second script will run on different folder that has folders with a file in each folder. This script should permanently delete (purge) all folders and it’s contents, but KEEP the folder and contents with the most recent created date of everything in that particular folder at the time - always keeping the original directory folder path in place.
     
  4. casperes1996 macrumors 68040

    casperes1996

    Joined:
    Jan 26, 2014
    Location:
    Horsens, Denmark
    #4
    I wasn't suggesting not to use scripts. Just to use bash scripts instead of Apple Script scripts. Regardless, what's the purpose of ChronoSync in this case? Just to tick the timer? Because then what I'd personally do instead, is to set up a crontab with bash
     
  5. Lightscap3s thread starter macrumors newbie

    Lightscap3s

    Joined:
    Mar 14, 2018
    Location:
    Carmel, IN
    #5
    It's an application for syncing and backing up files with a ton and functions and setup options, but none that fits my particular need for this syncing and backup effort. It allows for Apple Scripts to be ran before and after a sync.
     
  6. superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #6
  7. NoBoMac macrumors 68020

    Joined:
    Jul 1, 2014
    #7
    First half of the problem is easy-peasy, if understanding the problem.

    Code:
    cd pathtoparentfolderhere
    find -d . -type f -mtime +2 -delete
    find -d . -type l -mtime +2 -delete
    find -d . -type d -empty -delete
    Could probably condense into:

    Code:
    cd pathtoparentfolderhere
    find -d . -type d -mtime +2 -exec /bin/rm -rf {} \;
    
    Second part is similar, but, you will need to play around with using with the "! -newer" switches.
     

Share This Page

6 March 14, 2018