thank you for support.
def relinkBtnCmd(self, *args):
#get the path specified in the text field using a query
basePath = cmds.textField(self.txtFieldFolderLocation, query=True, text=True);
index = cmds.textField(self.txtFieldOldFolderLocation, query=True, text=True);
# list all file nodes
# repeat for each node
for node in fileNodes:
#get the current path
currPath = cmds.getAttr(node + '.fileTextureName')
#split the path name at the last folder
pathSplit = currPath.split(os.sep) #get positon of last '/' '\'
filename = pathSplit[-1] # split filename
#rel = os.path.relpath(currPath, basePath)
rel = os.path.relpath(currPath, index)
#combine basePath and filename to create a new path
#newPath = "%s/%s" %(basePath, filename)
newPath = os.path.join(basePath, rel)
# set the path in the texture node
cmds.setAttr(node + '.fileTextureName', newPath, type='string')