u/Fit-Entrepreneur6202

Hey everyone,

I finally managed to build a working file browser shortcut for iOS, and I’m pretty happy with it 😅

Here’s the link if you want to check it out:

https://www.icloud.com/shortcuts/7027a21ce90c4717a4bfe5bde0f7ab2d

The shortcut lets me navigate through folders and open files, which is exactly what I was trying to achieve.

Now I’d like to improve the UI a bit, and I was wondering if someone here could help me with two things:

  1. Add a proper BACK button (⬅️)

What I’m trying to do is:

- Have a “⬅️ BACK” option always displayed at the very top of the list

- But ONLY when I’m inside a subfolder (so starting from the second level)

- It should NOT appear on the first screen when launching the shortcut

- When tapped, it should take me back to the previous folder

  1. Add emojis for better readability

I’d like each item in the list to be clearly identifiable:

- 📁 for folders

- 📄 for files

The tricky part (at least for me) is doing this without breaking the navigation logic, since the shortcut currently relies on selecting actual file objects.

If anyone has a clean way to implement this (especially the back button logic), I’d really appreciate it.

Thanks in advance!

reddit.com
u/Fit-Entrepreneur6202 — 24 days ago

hi im trying to build a small file browser using shortcuts and i keep running into a problem i cant solve

what im doing is simple i start from a folder then i get its contents and show it with choose from list so i can navigate inside folders

goal is

if i select a folder it should go inside it

if i select a file it should just open it

right now it kind of works but not correctly

when i tap a folder it shows the next level in the list but it also opens the folder in the files app in the background

when i tap a file it opens fine but i still get an error saying the file is not a folder

so basically everything works but shortcuts still throws an error because it tries to use get contents of folder on a file

i think the issue is that there is no way to check if the selected item is a folder or a file

i couldnt find any condition like type or is folder

so i dont know how to stop the recursion when its a file

is there any way to detect if something is a folder in shortcuts

or any workaround to avoid this error

if needed i can share the shortcut in comments

thanks

https://www.icloud.com/shortcuts/021aa816bf50450db5fcf50d19a24647

reddit.com
u/Fit-Entrepreneur6202 — 26 days ago