Page 1 of 1

Filing using rename with pattern and the Tags attribute

PostPosted: Fri Aug 05, 2016 12:34 pm
by geegovah
I use tags systemwide, either using a Hazel rule to add tags based on folder name or Indev Mailtags 3 to tag emails. I have been looking for a way to bring together files in folders with associated emails.

I archive emails using Email Archiver Pro which archives emails as individual pdfs but also maintains the tag added by Mailtags. It is visible in the Tags folder if I switch on the column Tags and they are also searchable in Spotlight and Leap and Yep by Ironic.

My conditions are:
Kind is pdf
Tags is not blank

I am having a problem using the Tags attribute when renaming the file. There is no problem with the renaming string "email received" as added text, and 'name' and 'extension' as elements. The file is not renamed by the attribute Tags, whether I use Tags associated with this item or Tags set on a file by a user (Open Meta) but the other renaming elements are working and the file is moved to the correct. Is it the wrong type of tag for the attribute to work?

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Fri Aug 05, 2016 5:15 pm
by Mr_Noodle
Well, I would consider migrating off of OpenMeta entirely as that definitely confuses the situation. Also, make sure to only tag things with programs that use normal OS X tags and not OpenMeta. Once that has happened try it again and see if that fixes things.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Mon Aug 08, 2016 4:08 am
by geegovah
Mr_Noodle wrote:Well, I would consider migrating off of OpenMeta entirely as that definitely confuses the situation. Also, make sure to only tag things with programs that use normal OS X tags and not OpenMeta. Once that has happened try it again and see if that fixes things.


Thanks for your reply, and for working on a Sunday to reply.

My confusion remains. Hazel works for the conditions (it successfully finds tagged files applied by Mailtags and copies the file) but not for the action (it doesn't rename with the tag). One of the attributes is specific to Open Meta tags but that doesn't work. Am I missing something here?

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Mon Aug 08, 2016 6:55 am
by geegovah
geegovah wrote:
Mr_Noodle wrote:Well, I would consider migrating off of OpenMeta entirely as that definitely confuses the situation. Also, make sure to only tag things with programs that use normal OS X tags and not OpenMeta. Once that has happened try it again and see if that fixes things.



I followed your advice on a different set of untagged files. Using Finder I tagged the files (thus using OSX tags) and ran the rule. The files were copied and renamed but again without the tag name, so my confusion grows.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Mon Aug 08, 2016 2:12 pm
by Mr_Noodle
Try running 'mdls' on the file and posting the output.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Mon Aug 08, 2016 5:11 pm
by geegovah
Mr_Noodle wrote:Try running 'mdls' on the file and posting the output.


I'm so sorry I don't know what that means.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Tue Aug 09, 2016 11:39 am
by Mr_Noodle
Ok, here's a step by step:
- Launch Terminal
- Enter 'mdls' (without the quotes, though).
- Enter space
- Drag one of the files not being renamed properly into the Terminal window.
- Hit return.

Post/email the output from that.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Tue Aug 09, 2016 1:51 pm
by geegovah
Here's one file with openmeta tag added by Mailtags

GRAHAMs-Air:~ grahamgover$ mdls /Users/grahamgover/BitTorrent\ Sync/Documents\ BT\ Sync/grahamgover@fastmail.co.uk/INBOX/2016/08/2016-08-01\ 14.11.48Z\ \ RE\ \ Barn\ Orchard\,\ Higher\ Furzeland.pdf
_kMDItemOwnerUserID = 501
kMDItemAuthors = (
"BrianDinnis@acornrpc.co.uk"
)
kMDItemContentCreationDate = 2016-08-02 10:46:06 +0000
kMDItemContentModificationDate = 2016-08-02 10:46:06 +0000
kMDItemContentType = "com.adobe.pdf"
kMDItemContentTypeTree = (
"com.adobe.pdf",
"public.data",
"public.item",
"public.composite-content",
"public.content"
)
kMDItemCreator = "com.palmerandersen.emailarchiverpro version:3.3.5"
kMDItemDateAdded = 2016-08-03 15:09:02 +0000
kMDItemDescription = "RE: Barn Orchard, Higher Furzeland."
kMDItemDisplayName = "2016-08-01 14.11.48Z RE Barn Orchard, Higher Furzeland.pdf"
kMDItemEncodingApplications = (
"Mac OS X 10.11.6 Quartz PDFContext"
)
kMDItemFSContentChangeDate = 2016-08-02 10:46:06 +0000
kMDItemFSCreationDate = 2016-08-02 10:46:06 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "2016-08-01 14.11.48Z RE Barn Orchard, Higher Furzeland.pdf"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 270935
kMDItemFSTypeCode = ""
kMDItemKeywords = (
"briandinnis@acornrpc.co.uk",
"graham@grahamgover.co.uk",
"rh@live.co.uk"
)
kMDItemKind = "PDF Document"
kMDItemLogicalSize = 270935
kMDItemNumberOfPages = 2
kMDItemOMUserTags = (
HOT0011
)
kMDItemOMUserTagTime = 2016-08-02 10:46:06 +0000
kMDItemPageHeight = 841.8898
kMDItemPageWidth = 595.2756
kMDItemPhysicalSize = 274432
kMDItemSecurityMethod = "None"
kMDItemTitle = "RE: Barn Orchard, Higher Furzeland."
kMDItemUserTags = (
HOT0011
)
kMDItemVersion = "1.4"
GRAHAMs-Air:~ grahamgover$

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Tue Aug 09, 2016 1:54 pm
by geegovah
Mr_Noodle wrote:Ok, here's a step by step:
- Launch Terminal
- Enter 'mdls' (without the quotes, though).
- Enter space
- Drag one of the files not being renamed properly into the Terminal window.
- Hit return.

Post/email the output from that.

And here's one with a tag added in Pages, so OSX tag

GRAHAMs-Air:~ grahamgover$ mdls /Users/grahamgover/BitTorrent\ Sync/Documents\ BT\ Sync/grahamgover@fastmail.co.uk/INBOX/2016/08/Untitled\ 2.pages
_kMDItemOwnerUserID = 501
kMDItemContentCreationDate = 2016-08-08 10:37:30 +0000
kMDItemContentModificationDate = 2016-08-08 10:37:30 +0000
kMDItemContentType = "com.apple.iwork.pages.sffpages"
kMDItemContentTypeTree = (
"com.apple.iwork.pages.sffpages",
"public.zip-archive",
"com.pkware.zip-archive",
"public.data",
"public.item",
"public.archive",
"public.composite-content",
"public.content"
)
kMDItemDateAdded = 2016-08-08 10:47:42 +0000
kMDItemDisplayName = "Untitled 2.pages"
kMDItemFonts = (
TrebuchetMS,
Verdana,
"Helvetica-Bold",
"Helvetica-Light",
Helvetica,
HelveticaNeue
)
kMDItemFSContentChangeDate = 2016-08-08 10:37:30 +0000
kMDItemFSCreationDate = 2016-08-08 10:37:30 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "Untitled 2.pages"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 302799
kMDItemFSTypeCode = ""
kMDItemKind = "Pages Publication"
kMDItemLogicalSize = 302799
kMDItemPhysicalSize = 303104
kMDItemUserTags = (
HAR0081,
HAR0081
)
GRAHAMs-Air:~ grahamgover$

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Wed Aug 10, 2016 10:55 am
by Mr_Noodle
Something to try. Add a condition like "Date last modified is not in the last X minutes" to delay matching. I'm wondering at this point if Spotlight is a bit slow to index the new tags so maybe this will help.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Wed Aug 10, 2016 11:48 am
by geegovah
Mr_Noodle wrote:Something to try. Add a condition like "Date last modified is not in the last X minutes" to delay matching. I'm wondering at this point if Spotlight is a bit slow to index the new tags so maybe this will help.


Added that as a 10 minute delay condition and force ran the rule. Same result.

Re: Filing using rename with pattern and the Tags attribute

PostPosted: Thu Aug 11, 2016 11:48 am
by Mr_Noodle
Can you export your rules and send them in to support? Also, include which version of OS X you are running.