Is it a way to get a variable from file name?

Hi,

Firstly I’m very sorry to create so many topics on this forum ^^ I can’t find the documentation on the website then you are my only solution :smiley:

I wanted to know if there is a way to get a variable stored in the name of my item ?
Let me explain with a picture :

image
I loop into this folder to treat image by image, but now I want to get the hex color value between # and .png to store it as a variable and use it in a next part. Is it a way to do that ?

I tried something like that but it didn’t work at all, is it something to do with the operator ?

Thank you for your help

Hi @LucieDevGirl ,
I am happy to help with any questions, so please do not hesitate to post as many topics as you need. While a full documentation is not planned in the near future, I will try to post more tutorials soon.

Regarding your question, you are on the right track. You just need to use the action line instead of the set line. In the action line, you will find actions such as “find and replace text element” and “remove after last text element.” The text element is a property that you can set with the target text.

For example, if we have the name “10003__blue_#e24b4b.jpg,” we can set the “text element” property to “#” and then run the action “remove before last text element.” This will remove all the letters before the last “#” and leave us with the text “#e24b4b.jpg” Then, we can remove the extension using a similar method.

check out this example that display the hex color text in the name of the selected project file -

download -
get var name.json (14.3 KB)

Let me know if you have more questions,
Alon

Thank you very much :slight_smile: it worked perfectly