Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Formula to ignore everything LEFT of last "/" in file path and file name

Solved
Jump to Solution
274 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi there,

I have a conundrum that I hope someone can please help me with! It’s all about the final “/”

Basically I want to extract the last part of a file path + filename string, to leave only the filename. The path and name can all be different lengths, and have different folder depths. The key is to take everything AFTER the final “/” Examples below…

/Volumes/my_drive/documents/pictures/A001.jpeg
/mnt/usb/pictures/123456.tiff
/Server/over_there/no_really/this_one/what a long path/Big File.mov

would parse…

A001.jpeg
123456.tiff
Big File.mov

Any ideas please, fantastic Airtable community?

Thanks!

1 Solution

Accepted Solutions

You could do it with REGEX_REPLACE()

REGEX_REPLACE(
   {Field Name}, 
   "^(.+)\\/([^\\/]+)$", 
   "$2"
)

See Solution in Thread

2 Replies 2

You could do it with REGEX_REPLACE()

REGEX_REPLACE(
   {Field Name}, 
   "^(.+)\\/([^\\/]+)$", 
   "$2"
)

That’s amazing Kamille, thanks so much! Worked a charm, you got the skills! Appreciate it.
Cheers.