Batch Renamer v2.0


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Tyler Lockard
With a simple UI, we can batch rename in Nuke. I'll also update your Read node for you!
Requirements:
10.0, 9.0, 8.0, 7.1, 7.0, 6.3, 6.2, 6.1, 6.0 or later
Linux, Mac, Windows
07 Jun 2016
488

BatchRename

BatchRenameSuccess


 'Batch Renamer' removes all the hassle from jumping out of nuke, launching a batch rename program, probably messing up a few times, jumping back into Nuke and updating your read node... That takes like, a whole minute. That's just too long. With a simple UI we can do all that in Nuke, complete with highlight previews. I'll also update your Read node for you!  

Recently updated to support multi-selections!  Simply select a couple of read nodes.  The rename operation will search-and-replace across every filename.


 

 

Comments? Questions? Feel free to reach out!
// Tyler Lockard // 2016 // tylerlockard.com //

Please login in order to download these files.

Comments   

 
# Octavio Mancilla 2015-04-24 16:27
Sorry in advance for such a noob question, but how do I launch it? I've tried adding it to my menu.py but keep getting the traceback: __init__() takes exactly 2 arguments (1 given)
 
 
+2 # Tyler Lockard 2015-04-24 17:10
Hey Octavio! Try this out. In the menu.py add:

menubar = nuke.menu("Nodes")
m = menubar.addMenu ("Some Cool Stuff")
m.addCommand('Batch Rename', 'import batchrenamer; batchrenamer.main()')

Relaunch Nuke and there should be a menu with a command that pops the dialog open. Let me know if you're still having trouble.
 
 
+2 # Octavio Mancilla 2015-04-24 19:19
Dude, you're amazing! Works perfectly, thanks a lot!
 
 
# Sacha Danjou 2016-06-07 14:58
Hey!

Works for me but only for one node even if I selected a bunch of read nodes.

Any explanation?

Thanks
 
 
# Tyler Lockard 2016-06-07 15:55
Hey Sacha!

I just designed it to work on a single node unfortunately, but I could definitely look into expanding that.

Give me a couple days and I'll see what I can come up with, between work hours :)
 
 
# Tyler Lockard 2016-06-07 21:32
Just updated it, give it a shot!
 
 
+1 # Doruk Saglam 2016-06-15 07:13
Thank you Tyler! It's really handy.

I just want to add something.
I had to add another line of script because when I run the script it was giving error on the read node. I realized it was changing the first slash to a backslash. I believe it's a windows conversion issue.

So just after this line:

# We're done! Now let's punch in the new value on the respective node


I added this line:

dir = dir.replace('\\ ', '/')

Maybe you can add an IF statement so this line applies on windows operating systems.
 
 
+1 # Tyler Lockard 2016-06-15 14:46
Awesome! I'm glad it's helpful.

Ahh pesky Windows file paths. That's the one OS that I can't properly test on, thanks a bunch for that call out!

I'll play around and include that in my next update.
 
 
# Jacky Toh 2017-06-16 08:38
I got this error when trying to use it.

[Error 32] The process cannot access the file because it is being used by another process.

Is there anyway around it?
 
 
# Tyler Lockard 2017-06-16 12:04
Hi Jacky!

That can be a fairly common error on some filesystems. If the files are being used in another app, some computer setups have issues with deleting or modifying them until they're no longer in use. I haven't run into that error using the renamer yet, but here's my best guess.

Try closing any applications that might be using the files. Think Quicktime Player, RV, Final Cut etc. (It's not typical, but sometimes even the "preview" function of some file browsers, depending on what operating system you're on.) Nuke by itself should be fine, but rendering in the background could cause it too, if it's using those files in the render.

Worst case scenario, you may have a "stuck" process that's holding onto those files, so to speak. I always hate doing it, but if all else fails, you could try the ol' "turn the computer off and on again" trick. That at least would guarantee that nothing's using the files when you reopen Nuke.

Lemme know how you make out. It can be tricky to troubleshoot without being on your computer. :lol:
 
 
# Jacky Toh 2017-06-16 14:57
Im using windows systems, i tried the old restart trick, but its still does not do the trick. Im guessing that it could be the active directory or group policy restriction, but im the administrator, but i try to rename a video file from my local disk to see if that is the issue but still the same error.
 
 
# Jacky Toh 2017-06-16 15:23
Ok i manage to rename it, the problem lies with other computer having access to it holding up the file, as the files is all connected to a network drive. It could be reason why i cant rename it.
 

You have no rights to post comments

We have 2275 guests and 131 members online