read a .txt file (log.txt) + create a folder

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

Moderator: Mr_Noodle

I want Hazel to read a text file (log.txt), and create a folder for a line in the txt file. The log.txt contains the results of a batch process in this structure
ISBN1 _book title - batch result
ISBN2 _book title - batch result
ISBN3 _book title - batch result
ISBN4 _book title - batch result

I can see in the Match Criteria Hazel has function "contents" and "contents matched". But I dont know how to tell hazel to read first line etc..

1 Read txt file where text is matched to pattern (put this in a new hazel custom variable (9 digits space _))
2 Create a folder, naming to the hazel custom variable
3 loop until text in txt file is "all finished"

Is this possible in shell or something simple -- I dont know how to write apple script.

Thankyou for you guidance.
Posts: 29
Joined: Fri Jul 13, 2018 5:17 pm

It would have to be done in a script, shell or Apple, to do that. I believe a shellscript shouldn't be too much trouble if you know the basics.
Site Admin
Posts: 7633
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Return to Support