Automatically create aliases from contents of subfolders

Hello,


I need some help with applescript.


I am trying to create a watch folder on an external HDD that has multiple subfolders. The goal is to have aliases of any quicktime files in the directory(s) made today created on a folder on my internal drive.


For example:


Have the contents of "/Volumes/HDDName/TopFolder" made within a certain timeframe show up as an alias in /InternalDrive/Users/UserName/Media Export Folder


I would like this done automatically with out the need for user interaction.


I am running OS X 10.11.3


Is this possible?


Any help would be greatly appreciated. I have no code knowledge what so ever.


Thanks!

Posted on Feb 24, 2016 5:41 AM

Reply
7 replies

Feb 28, 2016 2:35 AM in response to MajorPoncy

Try, Automator > Folder Action :

Open Automator > File > New > Folder Action :

User uploaded file

Toggle : Folder Action receives files or folders added to : select "Other...", and choose the folder you want to attach the Folder Action to :

User uploaded file

Build your workflow :

User uploaded file

Double click, or drag the Actions you require into :

User uploaded file

When done :

User uploaded file

For "Get Folder Contents" make sure : Repeat for each subfolder found, is checked.

For "Filter Finder Items" you will have to set the filter for the type of file you require to be passed to the "New Aliases" Action :

User uploaded file

For the "New Aliases" Action the default location is Desktop, toggle this and choose the folder you want the aliases to be saved to.

Save the workflow.

Nb. the Folder Action will only create aliases for new items added to your selected folder.

Feb 28, 2016 9:59 AM in response to MajorPoncy

As a workaround, It will work if you move the folder containing the files you want aliases for into the folder with the Folder Action.

This will also work with the contents of folders with subfolders moved into the folder with the Folder Action.

(It wont work if you move the folder to a subfolder in the folder with the Folder Action)

Nb. pardon the alliteration.

Feb 28, 2016 11:10 AM in response to MajorPoncy

Hello


Not that this implements folder action to create aliases automatically, but you might try the following script which will create symlinks to movie files of specified extensions created in the source directory tree in the last one day. Whenever you run this script, it will scan the source tree and create symlinks to those files meeting the criteria.



#!/bin/bash SRC="/Volumes/TEST/Top Folder" DST="$HOME/Media Export Folder" mkdir -p "$DST" || exit find -E "$SRC" -type f -iregex '.*.(mov|mp4|m4v|m2ts)$' -Btime -1d -print0 | xargs -0 -J% ln -fs % "$DST"




I myself have never trusted folder action and would prefer this sort of periodical scanning on demand.


Briefly tested under OS X 10.6.8.


Good luck,

H

Feb 28, 2016 2:45 PM in response to Hiroto

Here is what I am trying to do:


1- Export MOV file to external hard drive (drive has many sub folders)


2- Have OS X watch a folder (and its sub folders and sub sub folders, etc.) in the root of the drive and create an alias for any MOV files created today (today being the day the file was created).


3- Have video converter see alias and convert mov to mp4.


I have 1 and 3 figured out, just can't figure out 2.


I would like the script, automator workflow, etc. to start up with my computer and repeat forever.


Hopefully this is a more accurate description of what I am attempting to do.


Thanks,

Kevin

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automatically create aliases from contents of subfolders

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.