Need help extracting info and renaming files

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Need help extracting info and renaming files Thu Mar 02, 2017 6:11 am • by Brad992
I have a problem that I'm hoping someone can help me with. I just downloaded Hazel and I've been trying to do a few things but have gotten very stuck!!

I am trying to extract specific data from a large number of MSDS (eg. https://www.sciencelab.com/msds.php?msdsId=9923956). This is what I'm trying to do with them:

1. I want to have the file automatically renamed to the chemical name after downloading. I cannot figure out how to do this because all chemical names have a varied length of words. I don't know how to make Hazel take the name when it varies in length.

2. The other thing I want to do is extract the value of the melting point and boiling point and add it into the comments of the file. This has gotten me really scratching my head and I have no idea if there is a better program out there to do this or if it is even possible.

Any help or suggestions would be very appreciated!

Thank you for taking the time to read
Brad992
 
Posts: 1
Joined: Thu Mar 02, 2017 5:42 am

Use the preview function: https://www.noodlesoft.com/kb/previewing-your-rule/

There, you can view the text as Hazel sees it. If, for instance, the Product Name is on a line by itself, you can do a pattern like: "Product Name: (• product name)" where •product name is a custom attribute you define as matching "anything". "anything" will match everything to the end of the line it's on so you can grab the whole name that way.

If it isn't on a line by itself, then you can bracket it with the name of the next header.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion

cron