Jump to content
Carlos-Sz

Zip for Alfred 3: compress files and folders

Recommended Posts

Is there anywhere where zip actions in progress are visible?  Or can be cancelled?

 

I tried a test of zipping some folders, but accidentally included a huge one.  Nothing happened (or so I thought) and I went about my business.  I noticed that Alfred file actions and navigator were very very slow to show up, thought "huh."  Then about 10 minutes later, the zip file finally appeared.  File actions and navigator become snappy once more.  There was no visible indicator that something was happening, though.

 

Would like a way to cancel a zip in progress if it takes too long.  (Maybe just a pop-up message after 15 seconds, "This zipping is taking a while.  Click here to cancel.")

Share this post


Link to post

For that, I'd just download Keka here: http://www.kekaosx.com/en/

 

If you select multiple files and go to file actions, open with, and choose "Keka," it will zip them individually by default.  (Or just select a bunch of files and drag them onto Keka in the dock.  It will zip them without even opening up.  Nice little app.)

 

Actually, what I like BEST about this workflow is that you can zip multiple files into one.  There's just one problem for me: I just want to use the file actions method, no hotkeys or keywords.  Is there a way to change the workflow so I can still choose a name for the resulting zip file?  (Right now it seems the only way to choose the output name is by using a keyword, instead of using the file actions method of activating.)  This could be done with a callback to a keyword "%zipname: " something like Vítor did here: http://www.alfredforum.com/topic/2722-renameaction-—-renames-a-directory-or-file-preserving-the-extension/?p=15825

 

Edit: One more thing—can you set it to automatically reveal the output zip file in Finder on completion?  I think that's just a matter of adding an extra applescript output to "tell finder to show {query}" but I'm not sure how to implement precisely.

 

 

Suggestion noted. Thank you.

 

Is there anywhere where zip actions in progress are visible?  Or can be cancelled?

 

I tried a test of zipping some folders, but accidentally included a huge one.  Nothing happened (or so I thought) and I went about my business.  I noticed that Alfred file actions and navigator were very very slow to show up, thought "huh."  Then about 10 minutes later, the zip file finally appeared.  File actions and navigator become snappy once more.  There was no visible indicator that something was happening, though.

 

Would like a way to cancel a zip in progress if it takes too long.  (Maybe just a pop-up message after 15 seconds, "This zipping is taking a while.  Click here to cancel.")

 

I’ll have to think about due the workflow limitations.

 

After the zipping is started I don’t have control over the operation.

Share this post


Link to post

Awesome workflow my man! I've only run in to one issue– when trying to zip a folder the workflow throws an error:

[ERROR: action.script] 0:149: execution error: Can’t make text items 1 thru -2 of "testfolder" into type text. (-1700)

JSYK: I'm running the workflow in Alfred V3; not sure if that might be the issue. Either way, it seems like it's probably a minor error to fix, but I'm hardly an Applescript expert so I'll leave that to you... Anyway, thanks again for the dope flow!

Share this post


Link to post

Awesome workflow my man! I've only run in to one issue– when trying to zip a folder the workflow throws an error:

[ERROR: action.script] 0:149: execution error: Can’t make text items 1 thru -2 of "testfolder" into type text. (-1700)

JSYK: I'm running the workflow in Alfred V3; not sure if that might be the issue. Either way, it seems like it's probably a minor error to fix, but I'm hardly an Applescript expert so I'll leave that to you... Anyway, thanks again for the dope flow!

 

 

I’ll update the workflow as soon as possible.

 

Thank you for your feedback!

Share this post


Link to post

Hi Carlos,

 

I've downloaded ver 4 of your workflow. Congratulations, this is really solid piece of software. However, I've found two issues:

  • 'zip' keyword does not work on files without extensions (e.g. I'm trying to compress file with name 'seagull')
  • somehow the file action does not work when trying to compress a folder. I see the notification but no zip appears (needless to say that the fileaction works fine when compressing a file).
    There is an error in the debug:
[2016-09-15 18:56:13][trigger.action] Processing output of 'action.script' with arg '(
    "/Users/jarek/Desktop/abcd"
)'

[2016-09-15 18:56:14][ERROR: action.script] 0:74: execution error: Can’t make text items 1 thru -2 of "abcd" into type text. (-1700)
[2016-09-15 18:56:14][action.script] Processing output of 'output.notification' with arg ''

Please let me know if you need more evidence.

Best regards,

Jarek 

Share this post


Link to post
On 15/09/2016 at 1:58 PM, Jarek said:

Hi Carlos,

 

I've downloaded ver 4 of your workflow. Congratulations, this is really solid piece of software. However, I've found two issues:

  • 'zip' keyword does not work on files without extensions (e.g. I'm trying to compress file with name 'seagull')
  • somehow the file action does not work when trying to compress a folder. I see the notification but no zip appears (needless to say that the fileaction works fine when compressing a file).
    There is an error in the debug:

[2016-09-15 18:56:13][trigger.action] Processing output of 'action.script' with arg '(
    "/Users/jarek/Desktop/abcd"
)'

[2016-09-15 18:56:14][ERROR: action.script] 0:74: execution error: Can’t make text items 1 thru -2 of "abcd" into type text. (-1700)
[2016-09-15 18:56:14][action.script] Processing output of 'output.notification' with arg ''

Please let me know if you need more evidence.

Best regards,

Jarek 

 

Thank you for your feedback.

 

I've been busy lately but eventually I'll try to fix it.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...