# Assigning image path to file texture

**URL:** https://forum.highend3d.com/t/assigning-image-path-to-file-texture/48651
**Category:** Maya
**Tags:** python
**Created:** [March 19, 2011, 2:05pm UTC](https://forum.highend3d.com/t/assigning-image-path-to-file-texture/48651 "2011-03-19T14:05:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tom-hamilton](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ea5d25/32.png) [@tom-hamilton](https://forum.highend3d.com/u/tom-hamilton)
#### Post date: [March 19, 2011, 2:05pm UTC](https://forum.highend3d.com/t/assigning-image-path-to-file-texture/48651/1 "2011-03-19T14:05:46Z")

</div>

So i've created a file texture node:

cmds.shadingNode('file', name='depthMap', asTexture=True)

How would I now add an image path to the file, so it knows what image to use for the texture?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [March 19, 2011, 4:03pm UTC](https://forum.highend3d.com/t/assigning-image-path-to-file-texture/48651/2 "2011-03-19T16:03:06Z")

</div>

fileNode = cmds.shadingNode('file', name='depthMap', asTexture=True)  
cmds.setAttr(fileNode+".fileTextureName",'path', type='string')
