A few tools that help simplify cleaning nuke scripts
The tool expects this layout:
I:/<PROJECT>/03_Production/Shots/<SEQUENCE>/<SHOT>/
├── Scenefiles/
│ └── Compo/
│ └── Compo/
│ └── ...
└── Renders/
├── 3dRender/
└── ...
This first tool simply selects all "READ" nodes that are not connected to any "WRITE" node. This selection will allow the artist to decide the actions to do with the nodes that are selected (i.e. delete them to clear the scene).
Parses your nuke scene for all used versions of the renders, then parses the renders directory and tags all unused renders with "TO_DELETE" as prefix.
This does not automatically delete any file or folder.
Parses the render folder for every tool tagged with "TO_DELETE", and deletes them. It is usually best to use this after having run the "Nuke scanner" in order to have all unnecessary versions tagged to delete. These two tools were seperated to avoid any unwanted deletions, and allow as much manual security as possible.