# Bulk rename script

**URL:** <https://forum.logik.tv/t/bulk-rename-script/705>\
**Category:** Python\
**Created:** [September 14, 2020, 2:34pm UTC](https://forum.logik.tv/t/bulk-rename-script/705 "2020-09-14T14:34:28Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![JulianMartinz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/julianmartinz/32/157_2.png) [@JulianMartinz](https://forum.logik.tv/u/JulianMartinz)\
**Post date:** [September 14, 2020, 2:34pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/1 "2020-09-14T14:34:28Z")

</div>

Hey gang,

decided to share a simple script I am using quite often when creating versions. It let’s you perform bulk renames (initial naming was batch rename which was quite a bit misleading …) on the desktop/library. You can find n replace strings and/or add tokens (`<date> / <time> / <count##>`) similarly to flames own naming schemes.

Just get the bulk\_rename.py from the [linked repo](https://github.com/julian-martinz/flamepy) and drop it in your /opt/Autodesk/shared/python folder. Tested for v2020.x but should also work for 2021. If you need additional tokens the script should be fairly easy to extend. However if you can’t or just don’t want to bother with python I can also add more tokens if I got the time. Just tell me what exactly you need.

Best,  
Julian

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [September 17, 2020, 9:57pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/2 "2020-09-17T21:57:01Z")

</div>

holy cow this looks amazing!!!

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [September 17, 2020, 9:57pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/3 "2020-09-17T21:57:25Z")

</div>

Could you do a super quick write up for those that haven’t ventured to the flamepy side yet?

---

<div class="post-metadata">

**Author:** ![JulianMartinz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/julianmartinz/32/157_2.png) [@JulianMartinz](https://forum.logik.tv/u/JulianMartinz)\
**Post date:** [September 18, 2020, 6:11am UTC](https://forum.logik.tv/t/bulk-rename-script/705/4 "2020-09-18T06:11:26Z")

</div>

That can certainly be done.  
What exactly do you have in mind / think could be helpful?  
An explanation of the functionality of the script? Guidance for understanding the code in order to extend the script? Or are you thinking of an even more general approach?

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [September 18, 2020, 4:13pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/5 "2020-09-18T16:13:29Z")

</div>

I mean, any or all of that sounds amazing. I’m just getting started with Python and it’d be great to help anybody else in the same boat see what you’ve done and help them get started on their own.

---

<div class="post-metadata">

**Author:** ![johnag](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnag/32/573_2.png) [@johnag](https://forum.logik.tv/u/johnag)\
**Post date:** [September 18, 2020, 10:15pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/6 "2020-09-18T22:15:26Z")

</div>

I’d like a script that can iterate a filename. eg 30\_sec\_edit\_v01.  
Right-click on that to iterate it to v02. ie duplicate v01 then rename the original v01 to v02 (so that it stays as an open sequence)

Is this doable in python?

---

<div class="post-metadata">

**Author:** ![kyleobley](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kyleobley](https://forum.logik.tv/u/kyleobley)\
**Post date:** [September 19, 2020, 6:01am UTC](https://forum.logik.tv/t/bulk-rename-script/705/7 "2020-09-19T06:01:28Z")

</div>

Very much so. Our engineer has written one to do just that, but it’s bespoke to our naming convention. I can share it on Monday.

---

<div class="post-metadata">

**Author:** ![kyleobley](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kyleobley](https://forum.logik.tv/u/kyleobley)\
**Post date:** [September 21, 2020, 10:32am UTC](https://forum.logik.tv/t/bulk-rename-script/705/8 "2020-09-21T10:32:50Z")

</div>

[This](https://www.dropbox.com/s/hfkhwn7ntzxwhwx/gw_seq_version_up.py?dl=0) is what we use to version up. Our naming convention is foobar\_gw##\_ddmm

gw## = Version number  
ddmm = Day / Month

The script looks for ‘gw’ and uses the number after that to increment and then attaches today’s date to the end. You could use this as a base to tweak to whatever your convention is.

EDIT: So links are very visible…click [Here](https://www.dropbox.com/s/hfkhwn7ntzxwhwx/gw_seq_version_up.py?dl=0) to download.

---

<div class="post-metadata">

**Author:** ![johnag](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnag/32/573_2.png) [@johnag](https://forum.logik.tv/u/johnag)\
**Post date:** [September 21, 2020, 10:36am UTC](https://forum.logik.tv/t/bulk-rename-script/705/9 "2020-09-21T10:36:19Z")

</div>

Thanks. All I have to do now is get my head into python.

btw the “this” link is not there.

---

<div class="post-metadata">

**Author:** ![kyleobley](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kyleobley](https://forum.logik.tv/u/kyleobley)\
**Post date:** [September 21, 2020, 10:39am UTC](https://forum.logik.tv/t/bulk-rename-script/705/10 "2020-09-21T10:39:27Z")

</div>

That should be fixed now. If not: [https://www.dropbox.com/s/hfkhwn7ntzxwhwx/gw\_seq\_version\_up.py?dl=0](https://www.dropbox.com/s/hfkhwn7ntzxwhwx/gw_seq_version_up.py?dl=0)

---

<div class="post-metadata">

**Author:** ![johnag](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/johnag/32/573_2.png) [@johnag](https://forum.logik.tv/u/johnag)\
**Post date:** [September 21, 2020, 10:41am UTC](https://forum.logik.tv/t/bulk-rename-script/705/11 "2020-09-21T10:41:15Z")

</div>

> [@kyleobley](#):
>
> ttps://www.dropbox.com/s/hfkhwn7ntzxwhwx/gw\_seq\_version\_up.py?dl=0

The “this” link doesnt go anywhere. Maybe the h at the head is missing.

---

<div class="post-metadata">

**Author:** ![kyleobley](https://avatars.discourse-cdn.com/v4/letter/k/df788c/32.png) [@kyleobley](https://forum.logik.tv/u/kyleobley)\
**Post date:** [September 21, 2020, 10:43am UTC](https://forum.logik.tv/t/bulk-rename-script/705/12 "2020-09-21T10:43:19Z")

</div>

All very true, haha. Ok…third time’s the charm.

---

<div class="post-metadata">

**Author:** ![JulianMartinz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/julianmartinz/32/157_2.png) [@JulianMartinz](https://forum.logik.tv/u/JulianMartinz)\
**Post date:** [September 22, 2020, 10:54am UTC](https://forum.logik.tv/t/bulk-rename-script/705/13 "2020-09-22T10:54:31Z")

</div>

Ok … I will see if I can write something together if I got some sparetime. (Un)fortunatly there are jobs again, which is actually a good thing, but keeps me from doing side projects 😉 .

---

<div class="post-metadata">

**Author:** ![andymilkis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/andymilkis/32/11067_2.png) [@andymilkis](https://forum.logik.tv/u/andymilkis)\
**Post date:** [September 24, 2020, 11:21pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/14 "2020-09-24T23:21:41Z")

</div>

This is my favorite thread so far! 😀

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [September 24, 2020, 11:51pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/15 "2020-09-24T23:51:27Z")

</div>

How dare you apologize for doing work!

---

<div class="post-metadata">

**Author:** ![jr\_polenga](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/jr_polenga/32/1975_2.png) [@jr\_polenga](https://forum.logik.tv/u/jr_polenga)\
**Post date:** [February 12, 2021, 1:53pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/16 "2021-02-12T13:53:37Z")

</div>

Hi Guys.  
Can i set to default the render node naming, as “batch name” token?  
in time, tks @JulianMartinz ! usefull py! 😉

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [February 12, 2021, 2:06pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/17 "2021-02-12T14:06:29Z")

</div>

Yes. This is in preferences under the BFX/Batch tab.

---

<div class="post-metadata">

**Author:** ![jr\_polenga](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/jr_polenga/32/1975_2.png) [@jr\_polenga](https://forum.logik.tv/u/jr_polenga)\
**Post date:** [February 12, 2021, 2:28pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/18 "2021-02-12T14:28:59Z")

</div>

Thanks, @randy  
I’m feeling like an idiot. 😅  
sorry about stupid questions guys!

---

<div class="post-metadata">

**Author:** ![randy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/randy/32/6122_2.png) [@randy](https://forum.logik.tv/u/randy)\
**Post date:** [February 12, 2021, 2:48pm UTC](https://forum.logik.tv/t/bulk-rename-script/705/19 "2021-02-12T14:48:45Z")

</div>

You are not an idiot! You had the courage to show up here and create an account. You stumbled upon on old thread that reminded you that you didn’t know how to do something. Then you had the courage to ask something that you didn’t know. And now you know. Today it was about this. One day you will be asking about how to do something in Python and we’ll all be begging for you to hire us.

Thank you for asking a question.

I encourage anyone with any questions to please ask. If you can’t, private message someone here that you trust. Or join our Discord server [https://discord.gg/JMK4jtDRvx](https://discord.gg/JMK4jtDRvx) and you can real time voice chat or text with someone. On any given day there’s about a dozen of us on and chatting. And, if none of that works for you, feel free to ask a question anonymously at [https://forms.gle/9NkGX7unT4rTB9kX7](https://forms.gle/9NkGX7unT4rTB9kX7) and we’ll answer it on an upcoming podcast.

Thank you for asking.
