I have recently been trying to solve a PDF renaming task with Dynamo. Currently Revit is automatically generating a file name for hundreds of PDF’s we are printing. The current format is, FRIEDMAN_CENTRAL_R17_ALucree - Sheet - G004 - CODE DATA.PDF, our desired format is, G004 - CODE DATA_18-05-04.PDF. As you can see there is also a print date which I think is as easy as adding a date and time node. I am not looking for the whole answer to the problem here because I am new to Dynamo and think this is a good exercise but I am currently stuck on this. In my script I used a Unique Identifier to break the list into pieces and recombine it in the correct format. Currently I would have to do this for every file but I bet there is a way to have Dynamo scan the folder for PDF’s and rename the files in the correct format one at a time. Any help would be greatly appreciated and once again very new to Dynamo so go easy on me.
This is true, but the concepts in renaming are really good to know, and printing can’t fix those pesky consultant PDFs either, so I’d save printing for a future endeavor.
A quick update, Ive got my script to the point where I am passing the correct names to the archi-lab rename files node and it is acting a bit strange. Every time I run the script it renames only one of the pdf’s but does not format it with the correct name or the .pdf extension. It renames it with a Capital letter G. Can anyone spot my mistake? I am receiving a trace!back error stating the file already exists.