# Problem replace old Code Node with new Code Node

**URL:** <https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453>\
**Category:** Questions\
**Tags:** code\
**Created:** [July 23, 2023, 9:06am UTC](https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453 "2023-07-23T09:06:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://community.n8n.io/u/UweG)\
**Post date:** [July 23, 2023, 9:06am UTC](https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453/1 "2023-07-23T09:06:03Z")

</div>

I try to replace the former code-nodes with the new code-node and copy and past the script from an former code-node to the new code-node.  
But this will not work.

 ![Bildschirmfoto 2023-07-23 um 10.59.30](https://europe1.discourse-cdn.com/n8n/original/3X/0/5/05eb1327bbd7d237db202876f5a6296ff9e648c7.png)

There is no change in ‘File Name’ and ‘File Extension’ of the data-object.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [July 23, 2023, 11:53am UTC](https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453/3 "2023-07-23T11:53:43Z")

</div>

Are you sure that code worked in the Function Node? Because honestly it does not look like it ever could have. Simple reason being that the keys have to be camelCase. So for example `fileName`.

---

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://community.n8n.io/u/UweG)\
**Post date:** [July 24, 2023, 6:12am UTC](https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453/5 "2023-07-24T06:12:02Z")

</div>

This is the functionally workflow with old code-nodes.  
How to use the new code-nodes?

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [July 26, 2023, 10:17am UTC](https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453/6 "2023-07-26T10:17:11Z")

</div>

Looks like you were in fact using camel case properties on your existing Rename File node @UweG 🙂

So once you update your code accordingly, your existing code should continue to work as expected. I’ve tested this using the below example workflow on n8n@1.0.5:

This is the result:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/9/2/920b5d8676871d62aafa7f6460680778d9f7c8fd.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 24, 2023, 10:17am UTC](https://community.n8n.io/t/problem-replace-old-code-node-with-new-code-node/28453/7 "2023-10-24T10:17:35Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
