Using Shortcuts to get file details

One of the things that really irks me on iOS is not being able to see file suffixes. I have a Pages document, and save it as a Microsoft Word document that I can send to others. In Files, I see two files with the same name.

I recently discovered I can make a shortcut to show me the file suffix.

  1. Create a shortcut, and press the “…” icon on the upper right side. Make this shortcut a share sheet and give it a name. For example, “Show File Suffix”.
  2. Change Accepts to File.
  3. For the first step, Click on Documents, under Files is “Get File Details”.
  4. It’ll say “Get File Size from File.
  5. Press File Size and select File Extension.
  6. Press File and select Shortcut Input.
  7. Add the second step. Under Scripting is Notification. Select “Show Notification”. It wil say “Show Notification Hello World. Delete the text Hello World. Under the Variables shown above the keyboard, select File Extension.

Save the shortcut. Now when you are you need to find a file extension in Files, you can click and hold the file name, select Share, then select File Extension from the share list. You now see the File’s extension.

Hopes this helps others.

Shortcut Program

Shortcut Attributes


Great work to solving a problem that Apple created!

Is there a reason you don’t want to always see the file ‘type’ extension? I don’t use Finder much (I use PathFinder instead), but if you look at its “Advanced” prefs, you will find a checkbox labeled “Show all filename extensions”. I’ve never understood why Apple changed the default behavior to hide that information. :thinking: :upside_down_face:

If this was 2000, I would say something like “backward compatibility” because classic Mac OS didn’t use filename extensions for anything (associated apps were determined solely by the Creator and Type metadata). But filename extensions have been the preferred mechanism (even overriding any creator/type data that may be present) since the introduction of Mac OS X, so that argument no longer makes sense.

I understand the fact that an extension takes up space on the screen and (assuming there’s an associated app) doesn’t give you any more information than you would get from it’s default application icon, but I think hiding extensions by default is a bad idea. It makes it all too easy for malware to disguise itself as something else by appending multiple extensions (the last of which will be hidden by the Finder) and a custom icon resource.

Windows users have been getting burned by this for over 25 years. Apple shouldn’t be in such a rush to jump on this particular bandwagon.

The original tip was about iOS, not macOS.
I don’t see the issue it purports to fix. A Word document in Files on my iPad always shows the extension with no action from me. Perhaps that’s because I don’t have Office?

That doesn’t work on macOS. Even if you hide most extensions, a file name with more than one “dot” always displays all the extensions. The option to hide them in Get Info is grayed. In the Finder, you cannot hide any extensions if the filename has more than one.

I don’t have Office on my iPhone. I wonder if the iPhone and iPad do different things in this case.

Extension hiding was done because extensions are confusing. Most people who use computers don’t understand extensions and how they work and maybe they shouldn’t be changed or removed.

This was the idea behind the Creator and Type on the original Mac. There was no confusing file extension. It also meant that you couldn’t have two files with the same name but different invisible extensions. Both Unix and Windows used extensions, so for compatibility reasons, we need them in MacOS and iOS.

The problem is when I save a Pages file as a Word file, I can’t see which is which. Sometimes, I’ll save the file as a PDF too, and I’ll end up with three files showing me the same name. Fun all around!

Someone told me of another way that’s a bit simpler: Long press on the file name, then click on info when the context dialog show up. The suffix shows up there. Still no way to change it.

There are other frustrating things. For example, Preview on my Mac can take a PDF and turn it into a JPG as well as several other files. That’s convenient if I do a poster in Pages, but now need to post it to Facebook. There’s no built in way of doing that on the iPhone.