> If this is a snippet, you would do:<br>> ${TM_PROJECT_FILEPATH/\.[^.]*$//}<br><br>Dear Haris,<br>thank you for your reply. The code above works only if a new snippet is created and it is not my case as I would like to have the project name in the new template file instead.
<br><br>> Otherwise you need to provide us with more of an example of your  <br>> situation.<br><br>I will try to explain myself better.<br>Within the 'Bundles Editor' I create a new 'Template' and a new 'Template File'.
<br><br>In the 'Template' 'Command(s)' editor I have:<br><br>if [[ ! -f "$TM_NEW_FILE" ]]; then<br>   TM_YEAR=`date +%Y` \<br>   TM_DATE=`date +%d" "%b" "%Y" "@" "%I:%M" "%p" "%z` \
<br>   TM_USERNAME=`niutil -readprop / /users/\$USER realname` \<br>   perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \<br>      < testfile.html > "$TM_NEW_FILE"<br>fi<br><br>and in the 'Template File' editor I have:
<br><br><!-- ${TM_PROJECT_FILEPATH} - ${TM_DATE} --><br><br><br>Next... I do create a new Textmate project and I save it to desktop as 'testfile' and create a new template, selecting the new template I just created above.
<br><br>The output for the new created template is:<br>/Users/webrevol/Desktop/testfile.tmproj<br><br>..but what I would like to get is only the project filename:<br>testfile (or testfile.tmproj)<br><br>As you see I would like to get the textmate project name on my new created file without the Path and if possible, without the filename extension.
<br><br>Again, thanks for your time.<br><br>