With the upcoming iOS 13 update, Shortcuts is
all set to get even better, allowing you to
automatically trigger workflows at a specific
time and location.

Today, we’ll take a look at a simple
automation that tells you the size of any file
passed to it. iOS, by default, doesn’t have a
native option to find out the size of a file.

One alternative is to upload your images and
videos to a cloud service like Google Drive,
Dropbox, or OneDrive. Another option is to use
Apple’s built-in Files app, which uploads the
files to iCloud. But Shorcuts makes it dead
simple to get this information with a few steps.
Here’s how to do it:

Step #1: Download the Shortcuts app from the
App Store , if you haven’t done so already.
(Note: It comes pre-installed on your device if
you’re already running iOS 13 developer or
public beta .)

Step #2: Open the app, and in the “My
Shortcuts” tab, hit “+” on top to create a new
shortcut.

Step #3: Tap the “Settings” icon on top right,
and give the shortcut a name, for example,
“Get File Size.” You can also tap the “Icon” to
change it to something that matches your
shortcut’s function better.

To give you a quick primer, Shortcuts can be
triggered in two different ways: they can be run
either from within the app as a standalone
workflow, or can be initiated from the Share
Sheet menu.

To do this, turn on the option “Show in Share
Sheet.” You can even fine-tune the shortcut by
specifying the kinds of inputs it should run on.
Now tap “Share Sheet Types” to select the
relevant input file options. In this case, for
example, it makes sense to run the shortcut
when the input is a multimedia file (photo or
video), or other kinds of files like PDFs.

Step #4: Next, add a “Get Details of Files”
action. This does exactly what it says — get
different details associated with a file, such as
name, extension, creation date, last modified,
and size.

Step #5: Now, tap the “Detail” field and select
“File Size” as the option. This will return the
size of the file passed as input.

Step #6: A convenient way to show the file
size is to send a notification. You can do this
by adding a “Show Notification” action and
linking it to the output of the previous step.
You can further customize the notification
message so it’s more easy to understand.

Step #7: That’s it! You’re done. To run the
shortcut, all you have to do is select a photo or
some other file, the size of which you want to
determine.

Then, tap the “Share” icon, and select “Get File
Size,” the name of the shortcut set in step #3.
Once the shortcut completes running, you’ll
receive a notification with the message
containing the size of the file.