Rename File to Folders Name

Hi i have a button i'm trying to make but im having one issue. I am trying to rename the file to the folders name but its getting hung up with the extension. it erases the extension. what do i need to add or change to rename the file to the folder name but retain the extension it has. this is what i have so far.

<?xml version="1.0"?> <button backcol="none" display="both" label_pos="right" textcol="none"> <label>Replace</label> <tip>Replace File Name w/ Folder Name</tip> <icon1>#rename</icon1> <function type="normal"> <instruction>Rename to=&quot;{parent} &quot; FILEINFO</instruction> <instruction>@NoDeselect</instruction> </function> </button>

The following should do what you want (Note the ".{ext}")

<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
   <label>Replace</label>
   <tip>Replace File Name w/ Folder Name</tip>
   <icon1>#rename</icon1>
   <function type="normal">
      <instruction>Rename to=&quot;{parent}.{ext} &quot; FILEINFO</instruction>
      <instruction>@NoDeselect</instruction>
   </function>
</button>

you roxor ty much! :thumbsup: