Run script for new files in subfolders

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Run script for new files in subfolders Mon May 02, 2022 5:10 pm • by karth
Hi there, I'm relatively new to Hazel and I'm struggling to run a simple bash script based on whether any file gets added to any of the subfolders within the main folder I'm monitoring. Could someone tell me how to do this?
karth
 
Posts: 3
Joined: Mon May 02, 2022 5:03 pm

Re: Run script for new files in subfolders Tue May 03, 2022 8:56 am • by Mr_Noodle
Do you want the script to run on the new files or on the folders containing them?
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Run script for new files in subfolders Tue May 03, 2022 11:22 am • by karth
On the parent folder... Honestly the script is agnostic to any location and merely asks my media manager to rescan its pre configured folders..
karth
 
Posts: 3
Joined: Mon May 02, 2022 5:03 pm

Re: Run script for new files in subfolders Wed May 04, 2022 11:08 am • by Mr_Noodle
Check the manual for the chapter on syncing folders. While the action you are taking is different, the rule there and the caveats associated with it apply.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Run script for new files in subfolders Thu May 05, 2022 11:41 am • by karth
Thank you that worked.

Mr_Noodle wrote:Check the manual for the chapter on syncing folders. While the action you are taking is different, the rule there and the caveats associated with it apply.
karth
 
Posts: 3
Joined: Mon May 02, 2022 5:03 pm


Return to Support