Saturday, November 27, 2021

#1 2021-05-06 12:51:07 am

metaning
Member
From:: Australia
Registered: 2020-06-22
Posts: 18

Watching a folder for new files.

Hi,

Does anyone know if there's a better way to do a folder action that monitors a folder for the entry of a certain type of file, and then performs an action based upon that?

I managed to make it work for images, and apply the action so that when an image is added to ~/Downloads, it gets moved to ~/Pictures, BUT the action doesn't run when the images are airdropped into the folder from an iOS device, only when moved there manually in Finder.

Here's what I've done in Automator:

Automator Window

Is there a different first step I should use, or is there a lower-level way of watching the folder's contents that can be accessed with Applescript etc?

I tried substituting the Filter files step with a Find Files step, but I think it chainsawed through all the subfolders in ~/Downloads and pulled the images out of those as well. so ideally, whatever the solution is, needs to only apply to ~/Downloads at its root level, and not the contents of folders within.

Thanks,

Offline

 

#2 2021-05-06 01:14:04 am

metaning
Member
From:: Australia
Registered: 2020-06-22
Posts: 18

Re: Watching a folder for new files.

Oh, solved it - jut needed the pause action at the start, as per:

http://macosxautomation.com/automator/f … index.html

all working great now. smile

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)