def repathFileNodesForPublish():
    """
    Sets the fileIn nodes to publish for secondary push of files from
work/sourceimags to /publish/sourceimages
    """
    listAllFileNodes = cmds.ls(type = 'file') + cmds.ls(type =
"mentalrayTexture")
    for eachFile in listAllFileNodes:
        getPath = cmds.getAttr('%s.fileTextureName' % eachFile)
        if getPath:
            newPath = 'publish'.join(getPath.split('work/maya'))
            cmds.setAttr('%s.fileTextureName' % eachFile, newPath, type
= 'string')
        else:
            cmds.warning('%s has a BAD PATH!' % eachFile)