How can i trim from a text a specific part of it?

I use @Taifun file extension for a task where i read the FileList of a specific directory, and put it in a list. However the extension is gives back the whole access path of the files. I only need the files name. More over i don't need the extension either. The extension is asy to trim, but how can i trim out the whole path?

Use the split by block to generate a list, splitting by "/".

Then get the last item of that list (length of list) and remove the extension using replacement blocks

That was my first idea too. Thank you.
But i think i solved it a little easier, thanks to the block's help. :+1:
Here is the blocks:

Works fine.

It does rely on the path always being the same though....

Yes. And it is only differ from your solution in the split list item number. It is only create 2 item, yours is create item numbers related on directory depth.Not a big difference and the blocks would be almost the same.
Would be something like this: doesnt tested yet.

Here is a reusable procedure: (draggable blocks)


1 Like

Nice. I didn't think about making one step from two. Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.