Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8825199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:49:17+00:00 2026-06-14T06:49:17+00:00

My goal is to write an user-friendly automator service to e-mail selected files and

  • 0

My goal is to write an user-friendly automator service to e-mail selected files and folders.

To be user-friendly, I need to:

  1. Detect the input type. If it is a file, I go to the next step. If it is a folder I zip it first using the name folder_name.zip.

  2. Now, I only deal with files (selected or zip version of the folders). If the total size is less than a constant (let’s say 20MB) I add the whole lot to the e-mail. If not, I ask the user wether he/she really wants to continue and act accordingly to his/her answer.

  3. Cleanup : removing any created zip file.

I am stuck at almost all levels of this workflow (detecting the type of the individual items in input. Conditionally acting depending on the result. Sum up the sizes of all items, conditionally acting on the result).

I could also have two separate actions, one for files, one for folders, but I can’t find the “file only” input type.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:49:19+00:00Added an answer on June 14, 2026 at 6:49 am

    Hmm.

    I have created a service workflow for you. Its a proof of concept. And the final stage of adding files to email is left to you. You should also note that there is no checking for packages of applications/bundles. Which on a Mac will be seen as a file but else where as a folder.

    There is a lot going on in the service workflow.
    (To test the workflow in Automator ADD a ‘Get Selected Finder Items’ as the first Action. But it runs a lot faster when run as a service)

    But the basics are:

    Service receives selected : files or folders in “finder”

    1, Run Applescript.

    It takes the selected items and passes them onto an applescript that checks the size and then displays a dialogue if all items are larger than 20M. ( note the du command seems to round down some what).
    If user hits ok then we move on. If cancel the workflow will stop.
    No dialogue will display if less than 20M. It will just move on.

    2,Set value of Variable

    Store the full list in the Storage Variable and pass it on to the next action.

    3, Filter Finder Items

    filter for ‘kind’ is ‘folder’
    pass the result to next action.

    4, create Archive.

    I have left this to save on the desktop. But I suggest you do it to the users temp folder.

    pass the result down to the next action. ( path of the zip file if any.)

    5,Set value of Variable

    Stores the path to the zip file in the Archive Variable (if one was created )
    Do not pass it on to the next action.

    6,Get value of Variable

    (Does not take result of last action.)
    Get the Storage Variable value.
    pass the result to next action.

    7, Filter Finder Items

    filter for ‘kind’ is not ‘folder’
    pass the result to next action.

    8, Set value of Variable

    Store the file list in the files Variable.
    ….

    From here on you have two Variable. file and Archive

    you can use them to send the items they reference files and zip to you email ..

    And remember this is just a proof of concept.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to write something that is visible to the user in the
I need to write and algorithm that can detect which state an application (used
I need to prompt to user a msg that tells him to write a
My final goal is to write the program which can run on the Unix
Goal: Once i click on the start button on my user interface, i currently
Goal: Gain datatype date with year and month Problem: Need to help to convert
Goal: To implement a jQuery plugin for my rails app (or write one myself,
I'm trying to write a piece of code that reads a file line by
My goal is to write a program that handles an arbitrary number of tasks
I am trying to write a PHP script that retrieves an xml file from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.