Rename Files

Hi all,

I’m trying to rename pdf files after I plotted them.
I’m using Konrad’s custom node to do so.

It looks really simple to use but somehow I’m screwing up.

It gives me the error that it cannot create a file when that file already exists. What on earth is it creating? I just want to rename the file.

Many thanks again!


test naam veranderen.dyn (7.6 KB)

Are you ensuring that the Identifiers match the file name you are attempting to rename exactly?

1 Like

Do you mean the number of files? Yes those should be the same since they are coming from the same view set.

i meant the file name itself in this instance. Can you expand the all-nodes feeding the Rename.Files node, so we can see exactly what is being fed?

The node says the numbers of the lists should be matching, but the name of the Identifier has to be exactly the same as the the name in the directory path is that what you mean?

Yes, that is what worked for me.
Can you test this with your file naming?

I finally got it to work!

What did the trick was to copy the python script in the work space.
That way the Identifiers and the file names can still be different. That way I can filter on the sheet numbers from the list.

Thanks for your help Ewan_Opie.!


Can you please share the script , thanks in advance.

I couldn’t get this to work… for some reason it’s renaming the file with only the first character of the new name. Would anyone be able to help explaining why?
Many thanks

try making your inputs lists :slight_smile:

No… it still won’t do it :frowning:
The same error occurs. the error says:

Traceback (most recent call last):
File “”, line 27, in
WindowsError: [Errno 2] [Errno 3] Could not find a part of the path ‘E:\test\aaa.txt’.

did you make both inputs lists ?
it worked for me when I did that…


Yes, I did. I’m starting to think it’s me :confused:

@adam_bear1 once I did like you - directly with the python script instead of using the custom node it worked fine.

1 Like

I think that’s because the original node is specifying the data type for a default value, making it not a list, when it needs to be a list