Page 1 of 1

Subfolders, Recursion Filtering and more

PostPosted: Sun Jun 02, 2013 10:07 pm
by mlevison
Lets say I have a folder structure like:

Code: Select all
/Training
      /CSD
           /Handouts
           /Trainer
     /CSM 2 Day
          /Handouts
           /Trainer
....

and I wanted to copy PDF's and Excel Spreadsheets to a Drobox what tricks could I use? Ideally with the same folder structure.

I've tried sub-folders but as far as I can tell I can't filter subfolders on a specific type.

Any suggestions?
Cheers
Mark

Re: Subfolders, Recursion Filtering and more

PostPosted: Tue Jun 04, 2013 12:16 pm
by Mr_Noodle
How do you mean filter subfolders on a particular type in this case? Also, if you go that route, look up "source folder" in the help if you want to keep the folder structure.

Alternatively, if you are just looking to do a one-way sync, you can use the sync action on the folder.

Re: Subfolders, Recursion Filtering and more

PostPosted: Wed Jun 05, 2013 9:23 am
by mlevison
Is there any way to run a trace or get a debug log? I'm not getting the results I would expect - not surprising since we're effectively writing trivial programs in a language I don't understand.

If I could get a log of what its tried to do, i.e.:
- looked in folder Handouts
- Found 5 PDFS
- synced to ....

If I had something like that in five minutes I could probably do everything I want in Hazel. I'm failing right now because I'm fumbling around in the dark.

Thanks
Mark - mostly human

Re: Subfolders, Recursion Filtering and more

PostPosted: Wed Jun 05, 2013 12:16 pm
by sjk
mlevison wrote:Is there any way to run a trace or get a debug log?

Debug Mode

Re: Subfolders, Recursion Filtering and more

PostPosted: Sun Jun 09, 2013 5:15 pm
by mlevison
Ok looking at the logs the problem doesn't seem to be the recursion it seems to be getting PDF's recognized.

The rule I'm using is:

Name: Duplicate PDFs to Independant Trainers
If "any" of the following conditions are met for "any of its subfiles or folders"

Kinds is PDF

Do the following:
"Sync" into folder "CSM 2 Day - MDL"
----
The results the sub-folders of the main folder are synced, but the original word docs are copied over not just the PDF's.

What would a better rule be?
Thanks
Mark

Re: Subfolders, Recursion Filtering and more

PostPosted: Mon Jun 10, 2013 12:00 pm
by Mr_Noodle
Do not use "any of its subfiles or folders" or the sync action here (unless you don't want to filter anything and just copy the whole folder tree).

Read the subfolder sticky article at the top of this forum and also look up the source folder stuff as I mentioned before.