How to get file name where the text is inserted?

i am trying to get the file name.
In which , the text is inserted ??

means, you have 5 files named 1example.png,2example.png,3example.png,4example.png,5example.png.

now, i want to get only file where 1 is inserted. //1example.png

can i get the file name like this

please help me

1- Initialize a list with your five files.Initlize a variable to store the filename which contains you text,
2- when you want to check:
3- make like this:
for each item in list ( your files list) {
if ( item contains (your text for example (1) ) 
set result( your variable the result will be assigned to ) = item

I hope you understand me :slightly_smiling_face:


the problem is that i don’t know the file name . so, i am trying to get the file from asset.
only file where 1 is inserted.

Try to use file tools extension get File list from assets block:

i am using this extension already but i don’t know how can i get the file which is start from 1.

As i said> get the file list>Then:

i don’t know how to use this in my condition
component_method (3)

please share your blocks

Set a variable to this block, And then run this for each item in list loop:

Why don’t you try your self, it isn’t hard?

i am not doing this for extension,
it just for blockyeditor.

so, please show your blocks

I understand you, i just want your to try your self, here in the community we like to learn fishing instead of giving fish.If you have any thing you don’t understand for what i’ve told you, feel free to ask here :wink:

so, please show your blocks.

i don’t know how to use this block, so, please show your block.
even i don’t know what to use in kodular in the place of

It’s this block:
blocks (61)
BTW, it looks like you understood what i’ve sent as a java list, even it isn’t, it’s just a representation, of how it would be in the blocks :wink:


can you please show all the blocks

Here is how to add this block in an conditional statement.
blocks (62)
Now you just need to add it in this block:
blocks (63)
And add this blocks inside it:

As i said i want you to try your self instead of giving you complete blocks, that will help you understand what it does as you made it you self :slightly_smiling_face:

1 Like

A really workable solution

Use variable section then list section as what moderator told

1 Like

can u simply show Ur blocks where focus is to be made…
for showing blocks go to windows write snipping tool and capture…or get those blocks if they are few by downloading

hey, i already solve the problem

i am not new in kodular community. Don’t talk like this.