# Getting Last Rendered Image's Fullfilename

**URL:** https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437
**Category:** Maya
**Tags:** mel
**Created:** [February 19, 2007, 10:23am UTC](https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437 "2007-02-19T10:23:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kursat-turkay](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kursat-turkay/32/27_2.png) [@kursat-turkay](https://forum.highend3d.com/u/kursat-turkay)
#### Post date: [February 19, 2007, 10:23am UTC](https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437/1 "2007-02-19T10:23:14Z")

</div>

I need some string return value like that

"c:/test/a.iff"

(ie. it is a last rendered image (single frame).)

the most important is to get its file extension.

I think there should anotherway to check   
defaultrenderer.fileextension if 1-2-7-8 ... etc.

//renderWindowRenderCamera snapshot renderView "image";

---

<div class="post-metadata">

### Author: ![kurianos3d](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kurianos3d/32/55947_2.png) [@kurianos3d](https://forum.highend3d.com/u/kurianos3d)
#### Post date: [February 19, 2007, 10:27am UTC](https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437/2 "2007-02-19T10:27:40Z")

</div>

simple way query the image dir get the filename and get the ext then u can get the full path isit ??

---

<div class="post-metadata">

### Author: ![kursat-turkay](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kursat-turkay/32/27_2.png) [@kursat-turkay](https://forum.highend3d.com/u/kursat-turkay)
#### Post date: [February 19, 2007, 10:34am UTC](https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437/3 "2007-02-19T10:34:36Z")

</div>

getFileList is the only way ?

mm.

I thought if there is a command with queriable paramater that returns this.

and I investigated that command now.

renderSettings -firstImageName   
turns only file and extension.

I think I can catch something from here.

thanks

---

<div class="post-metadata">

### Author: ![kursat-turkay](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kursat-turkay/32/27_2.png) [@kursat-turkay](https://forum.highend3d.com/u/kursat-turkay)
#### Post date: [February 19, 2007, 12:27pm UTC](https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437/4 "2007-02-19T12:27:38Z")

</div>

here I finally get extension only

also

string $rndEx[0]

is the name of file only

string $rndEx[]=(`renderSettings -firstImageName`);

$renderExtension=fileExtension($rndEx[0]);//these couple of lines gets only extension "ie. iff"

---

<div class="post-metadata">

### Author: ![kurianos3d](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kurianos3d/32/55947_2.png) [@kurianos3d](https://forum.highend3d.com/u/kurianos3d)
#### Post date: [February 19, 2007, 12:46pm UTC](https://forum.highend3d.com/t/getting-last-rendered-images-fullfilename/2437/5 "2007-02-19T12:46:11Z")

</div>

i hope this will make sence

CODE  
global proc get\_where\_is\_img()  
{  
&nbsp;&nbsp;&nbsp;&nbsp;string $rndEx[]=(`renderSettings -firstImageName`);  
&nbsp;&nbsp;&nbsp;&nbsp;//here you can get the current projectpath  
&nbsp;&nbsp;&nbsp;&nbsp;//and then projectpath/image/$rndEx[0] is ur image name isit ??  
&nbsp;&nbsp;&nbsp;&nbsp;string $get\_cur\_img\_dir=`workspace -q -dir`;  
&nbsp;&nbsp;&nbsp;&nbsp;$renderExtension=$get\_cur\_img\_dir +"images/"+$rndEx[0];  
&nbsp;&nbsp;&nbsp;&nbsp;print ($renderExtension+"\n");  
}  
get\_where\_is\_img;
