Jump to content

Monitor Directory for Added Files


Recommended Posts

Or, alternatively, use an Automator Folder Action that activate an External Trigger from a workflow.

 

To create one:

  • Create a workflow in Alfred
  • Add an External Trigger object
  • Copy the content of the External Trigger inside the Sample Code section

 

  • Open Automator
  • Create a new Folder Action
  • At the top right of the actions list, select the folder that you want to be watched
  • Insert an Applescript action
  • In the Applescript script, insert this:

 

on run {input, parameters}
	repeat with f in input
		(* Paste the content of the Sample Code of the External Trigger in Alfred here and change the "test" string to f; Ex: *)
		tell application "Alfred 3" to run trigger "extTriggerName" in workflow "workflowName" with argument f
	end repeat
end run
  • Save the Folder Action
  • Modify your Alfred Workflow to manipulate the added files in the folder
Edited by GuiB
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...