Jump to content

Creating a folder with multiple sub-folders and re-naming automatically using Alfred

Recommended Posts

Hi all, 


I'm new to Alfred and have searched a bit on the forum but not quite found the answer I'm looking for.

Below is what I would like to achieve in Alfred, hopefully some kind person out there can tell me (a) if it's possible, and (b) how to go about it - or at least point me in the right direction.



I regularly create a folder containing about 6 sub-folders (and 2 of those sub-folders have sub-sub-folders within them) and re-name all the folders according to a strict protocol.

(At the moment I am doing this by using a dummy master folder with the correct folder structure and place-holder folder names.  I copy and paste it to the destination and then use the Mac rename function to rename all the folders according to my preferred file name).  

Is it possible to use Alfred to do this process for me?  And if so, how can it be triggered?  Ie hot key, folder mounted etc.


Ideally, if it is possible I would like to take things even further.

I am creating the folders/sub-folders to download and edit images for jobs I am working on.  In an "ideal ideal" world, whenever I slotted a memory card into the card reader it would automatically trigger the following actions;


  1. Alfred asks me for the name of the job and uses this info to create the folder/sub-folders/sub-sub-folders on a permanently connected external drive and names them correctly.  (Again, if we're talking ideal ideal world, Alfred would only ask me the client/job name and then enter the date into the folder names automatically in conjunction with this in the format YYYY_MM_DD_job_name)
  2. Again, in an ideal ideal world Alfred would launch Shotput Pro (download/download verification app) and use it to download the images to the correct sub-folder).
  3. Alfred would then (I don't ask for much, I know) launch Lightroom and create a new Lightroom Catalogue with the catalogue name YYYY_MM_DD_job_name_catalogue and import all the images
  4. Seeing I'm asking for so much already...
  5. Alfred would then get Lightroom to convert the images to DNGs, generate 1:1 previews, save to files and quit after backing up.


I am guessing that most of the above might not be possible, but I figure if I don't at least ask I will never know...Can anyone help me with the above?




Link to post

Most of these questions depend on the automation capabilities of the other apps.


Creating the directory trees is pretty straightforward - here’s an example of how I do it in a mixture of Applescript and bash script info, which I have hooked up to an Alfred workflow.


https://github.com/derickfay/course-creator/blob/master/Generate directories.applescript


Or another approach in



Note that both of these rely on the bash command mkdir to do the actual directory creation.

Edited by dfay
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...