title: blender , assign a texture via script with fixed name + variable
body: <p>here my issue. the script works fine in Blender 2.9 , until I put that random variable in the name. basically I need to link different textures to different files and materials via script . the problem is that I have label 21.jpg, label 34.jpg , label 345.jpg . that &quot;random variable&quot; is a placeholder, what do I need to put there so it succesfully loads the label texture , no matter which random number is in the name? thanks in advance</p>
  <pre><code>import bpy
  import os
  from random import *
  from time import gmtime, strftime
  import xml.etree.ElementTree as ET 
  from bpy.types import Operator
  from bpy.props import FloatVectorProperty,StringProperty, IntProperty, BoolProperty, EnumProperty
  
  os.getcwd()
  
  def remap_texture_images():
      color_img = bpy.data.images['color']
      color_img.filepath = bpy.path.relpath(&quot;//&quot; + &quot;label&quot; + random_variable + &quot;.jpg&quot;)
      
  remap_texture_images()
  </code></pre>