Problem with "Contents" rule

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

Moderator: Mr_Noodle

Problem with "Contents" rule Sun Sep 01, 2013 10:20 pm • by BrannonSG
Hello.

I am brand new to Hazel, and I'm trying to learn how to use the tool. It appears that it could be very useful, especially for scanning/filing documents. Unfortunately , I am running into a problem using "Contents" as part of my rules. Here is the latest example:

I download a file from PayPal. The file is named Download.csv. I can use Hazel to find the file, move it to the correct Folder, and rename it. All of this works just fine.

However, the potential for other files named Download.csv is high enough that I decided to ensure I'm grabbing the right file by checking the "Contents" of the file. So, I made a rule that looks for:

"Contents contain match Express Checkout"

Hazel no longer sees the file as a match even though this text string appears many times within the file.

I've also tried "Contents contain match Express" and "Contain Express" Neither of these work either.

What am I doing wrong?
BrannonSG
 
Posts: 1
Joined: Sun Sep 01, 2013 10:12 pm

Re: Problem with "Contents" rule Thu Sep 05, 2013 5:32 am • by nl6843
I also am having a similar problem with contents not reading HTML files

Any help appreciated

Nick Lloyd
nl6843
 
Posts: 3
Joined: Wed Oct 03, 2012 2:13 pm

Re: Problem with "Contents" rule Thu Sep 05, 2013 12:16 pm • by Mr_Noodle
I believe csv files can't be read because of the way that Excel categorizes them. Basically, it's not categorized as a text file so Hazel won't read it. You would either need to use a script or change the file to a txt file (and then change it back if needed).
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Problem with "Contents" rule Tue Mar 11, 2014 5:00 pm • by EmptyJay
I just ran into this same problem.

hazelimporter returns: "Could not get text content of file: <filename>"

If I change the filename from .csv to .txt, it works fine. Also, the 'file' command sees it as straight ASCII text either way.

I've worked around it by a pair of rules:
1 - Rename CSV files WITHOUT 'CSV' tag to TXT and add 'CSV' tag
xxx - other rules in the middle
2 - Rename TXT files WITH 'CSV' tag to CSV
EmptyJay
 
Posts: 1
Joined: Fri Sep 16, 2011 5:32 pm

Re: Problem with "Contents" rule Wed Mar 12, 2014 5:41 am • by nl6843
Mr. Noodle,

Can you tell me is that the same with HTML files?

Nick
nl6843
 
Posts: 3
Joined: Wed Oct 03, 2012 2:13 pm

Re: Problem with "Contents" rule Thu Mar 13, 2014 2:12 pm • by Mr_Noodle
It should work for html files. If you run into any problems with it, post details here.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support