Paratrooper Digital

Applescript: Copy for web deploy.

There are several workflows that could use some streamlining. One workflow is the migration of a web folder from a production webserver to a client/externally based webserver. Typically I copy the files from one server to another and then weed out the files I dont need. Sometimes I copy to an intermediary directory and upload from there.

Its about time that I worked on a tool to help streamline this workflow. Working on OS X there are several methods of doing this. Applescript and through the terminal with perl. I suppose a php script could also be written, but I was looking for a method primarily for clearing up a project directory for deployment from a local directory or from a networked drive. Not all connections to the webservers I work on require an ftp connection, so I wanted to stay away from scripting an ftp application to filter.

So I thought It might be nice to improve this workflow by developing a script that was flexible enough for people to use and extend. I figured this might be a nice time to learn a little bit of apple script. With the advances of the automator and cron jobs and in the application of applescript to the adobe cs suite of applications applescript seems to be a scripting language that I’d like to learn more about.

Develop a script that performs the following tasks…

  • The removal of folders that start with an ‘_’
  • The removal of files that have the extensions ‘.psd’, ‘.fla’, ‘.as’
  • The removal of ‘.DS_Store’ files
  • The logging of what files have been copied.
  • The logging of how much file size is in place with the web files.

I developed this script that takes a folder and creates a subdirectory called ‘_deploy’ that should contain all the goodness that one needs to deploy the site to a webserver without all the junk.

I’m looking into posting it soon.

About Nate Frank

Nate is currently a Senior Presentation Layer Architect at Razorfish Chicago. As an SPLA Nate: participates in technology leadership team and resource allocations, manage fulltime and contractor resources, represents technology for groups of brands across multiple clients, furthers development of standards within the office, architects project implementations and fosters community and mentoring.

View all posts by Nate Frank

Most recent posts