Question about unarchive action

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

Moderator: Mr_Noodle

Question about unarchive action Mon Mar 24, 2014 1:05 am • by miklb
Curious what process is being used to unarchive, as the action is different than if I double click a zip file.

The rule I have is if extension is zip, then unarchive. Pretty simple. However, for items such as an Alfred workflow, which carries an .alfredworkflow extension, Hazel's unarchive converts the zip into a folder structure. However if I double click the zip file, it extracts it as the desired extension. I'd assume this would occur with other custom extensions, just haven't encountered it yet. (thinking PopClip for one.)

Any thoughts or suggestions to unarchive the zip but preserve the custom extension?
miklb
 
Posts: 7
Joined: Fri Oct 14, 2011 9:56 pm

Re: Question about unarchive action Mon Mar 24, 2014 2:07 pm • by Mr_Noodle
Hazel shouldn't affect the filenames inside the zip. Hazel may put the items into its own folder so as to avoid scattering the files in the main folder. Or is .alfredworkflow a zip file itself and you are unarchiving that? If so, then I'm not sure what you're asking here.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Question about unarchive action Mon Mar 24, 2014 2:12 pm • by miklb
The file starts out as a zip. If I do not use the Hazel action unarchive, and manually double click the zip file, Mavericks returns an .alfredworkflow file. If I use the Hazel action, it unarchives the zip file into a folder structure, bypassing the .alfredworkflow extension, thereby rendering it unreadable by Alfred. I haven't tested, but would assume files like .popclipextz would equally be affected.
miklb
 
Posts: 7
Joined: Fri Oct 14, 2011 9:56 pm

Re: Question about unarchive action Wed Mar 26, 2014 12:10 pm • by Mr_Noodle
Is the alfredworkflow file inside the folder? I'm still not clear on what's happening to it.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Question about unarchive action Thu Mar 27, 2014 7:02 pm • by miklb
No, the .alfredworkflow "wrapper" is stripped out and all that is left is a folder with files. Basically, the unarchive action is being overly aggressive going beyond expanding .zip and is deconstructing the custom app wrapper.
miklb
 
Posts: 7
Joined: Fri Oct 14, 2011 9:56 pm

Re: Question about unarchive action Fri Mar 28, 2014 2:53 pm • by Mr_Noodle
What are the actual contents of the zip? Try using a program that will list the contents and posting that here.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Question about unarchive action Fri Mar 28, 2014 9:20 pm • by miklb
I don't know how else to explain.

Vist http://www.macdrifter.com/2014/02/alfre ... files.html

Download the zip. Double click. See Archive Utility unzip the file and leave Choose Task File.alfredworkflow

Now run a Hazel rule with Extension is -> zip, Action -> Unarchive

See Hazel turn the zip file into a folder Choose Task File that contains two .png files and a .plist file
miklb
 
Posts: 7
Joined: Fri Oct 14, 2011 9:56 pm

Re: Question about unarchive action Mon Mar 31, 2014 11:34 am • by Mr_Noodle
Thanks for that. I can replicate the problem here. The issue is that apparently, alfredworkflow files are also zip files. I'll look into limiting the unarchive action to maybe require the zip extension to prevent this type of thing.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support