# Add text to text node in shake

**URL:** https://forum.highend3d.com/t/add-text-to-text-node-in-shake/9232
**Category:** Compositing
**Tags:** shake
**Created:** [April 28, 2010, 9:37am UTC](https://forum.highend3d.com/t/add-text-to-text-node-in-shake/9232 "2010-04-28T09:37:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deke-kincaid](https://forum.highend3d.com/user_avatar/forum.highend3d.com/deke-kincaid/32/178_2.png) [@deke-kincaid](https://forum.highend3d.com/u/deke-kincaid)
#### Post date: [April 28, 2010, 5:35pm UTC](https://forum.highend3d.com/t/add-text-to-text-node-in-shake/9232/1 "2010-04-28T17:35:43Z")

</div>

in the cookbook folder is an example macro called Slate which will help you start rolling on this

/Applications/Shake/doc/html/cook/macros/slate

---

<div class="post-metadata">

### Author: ![k-kon](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/k/b38774/32.png) [@k-kon](https://forum.highend3d.com/u/k-kon)
#### Post date: [April 29, 2010, 10:29am UTC](https://forum.highend3d.com/t/add-text-to-text-node-in-shake/9232/2 "2010-04-29T10:29:58Z")

</div>

In Slate example {scriptName} that will get the filename with entire path, I want only the filename. plz help me.

Regards  
Narasimham k

---

<div class="post-metadata">

### Author: ![k-kon](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/k/b38774/32.png) [@k-kon](https://forum.highend3d.com/u/k-kon)
#### Post date: [April 29, 2010, 12:35pm UTC](https://forum.highend3d.com/t/add-text-to-text-node-in-shake/9232/3 "2010-04-29T12:35:49Z")

</div>

Hai to all

If I use {scriptName} in the text get the entire path of the script i.e "c:/documents and settings/test/test.shk", I want only the file name like test.shk

Text Manipulation V: Extracting Part of a String  
This function can be used to extract the file name from a FileOut or FileIn node so you  
can print it on a slate. Use it in a Text function.  
const char \*getBaseFilename(const char \*fileName)  
{  
extern const char \* strrchr(const char \*, char);  
const char \*baseName = strrchr(fileName, ’/’);  
return baseName ? baseName+1 : fileName;  
}  
To use it, place a line in the text parameter of a Text function, such as:  
{getBaseFilename(FileIn1.imageName)}

how to use this function inside the node

please help me

Regards  
Narasimham k
