Renaming folders with dynamo

Hello everybody:)

I have multiple folders that i need to be renamed, as they contains whitespace characters in the name.

I am aware of a method that can rename filenames, but i really cant find anything for folders.

does anybody know a solution or where to look?

Maybe this is not issue about dynamo…
there are severial freeware to rename files and folders like

Thank you. but in this case i would like to know if its acually possible to do in dynamo

Yes it is…here a very rough example…take care becourse the node actuelly do what it say :wink:

I normally use Robocopy…super fast and easy with more control

Hi Sovitek.

But wont your draft only move my folders? and not rename it.

Maybe i havent been so specific. i have an directory path that contains subfolders wich contains whitespace characters.

i will test it though, and sorry i might be a litte confused :smiley:

1 Like

This way i show will move the subfolders and file inside too and only rename the main folder…but you can rename the subfolders as well

try to make a simple test…for clean up your foldername with whitespaces try trim whitespaces in your new name

Hi @zodi

Yes that node will only move directories, but you could use a Transaction.End node (to make sure they all get copied properly first) and a node to remove the old directories to “copy” them :slight_smile:

1 Like

Nice Sean you are back :wink: …here is a link for robocopy if it its better…robocopy | Microsoft Docs and powershell for even more control there is a free app as well with a nice UI…i just believe its a more safe way…and a nice option is can be controlled by windows task schedule…

PS I dont get sponsored by RoboCopy…hahahah :wink: anyway think @Draxl_Andreas solution works great as well, but havent tried it…

2 Likes