How to change directory path of 100s of texture by scripting?


I am completely new to scripting . In my current project i have 100s of texture and cache file and i need to change the directory file.
i have “D:\Project\Attic\texture\Sets\chairs_diffuse.png” to “z:\Attic\texture\Sets\chairs_diffuse.png”
so how can i change the directory file through scripting . It will save a lot of time by running Scripts. So could some one help me in this.

Thank You in Advance


Use the FilePathEditor in Maya.


yeah but it will be easier if i had a script .iI will be just one click so…


Use the File Texture Manager script.


No need for scripting - just open your Maya file (saved as .ma not .mb) in a text editor like Notepad++ etc and do a search/replace to fix the file paths in it. Save and reload, done.



file path manager too slow? it should be about 3-4 clicks? way faster than typing some code.


The FilePathEditor is made todo exactly what you want.