Hello, is there a ready-to-go solution to rename all files in a Compass repository (and sub-repository) ?
My goal is to add [DEPRECATED] in front of lot file’s names.
Maybe it is simple to developpe this in SLATE ?
Hello, is there a ready-to-go solution to rename all files in a Compass repository (and sub-repository) ?
My goal is to add [DEPRECATED] in front of lot file’s names.
Maybe it is simple to developpe this in SLATE ?
Hi @gdf,
Thanks for the question. Short version: there’s no built-in bulk-rename and it isn’t something you can script against the Platform API today either.
The traversal half is fine. You can list the children of a folder or project and recurse into sub-folders to enumerate everything. The gap is the rename: updating the display name of the resources inside (datasets etc) isn’t currently exposed in the Platform API, so a script that prepends [DEPRECATED] to each item’s name isn’t achievable end to end right now.
This is a reasonable ask and something we should support. I’ll get resource rename onto our backlog. I can’t promise a timeline, but I’ll follow up here if there’s progress.
One check: by “repository” do you mean a Compass folder/project, or a Code Repository? Those are different systems with different answers and I want to make sure I’m pointing you at the right one.
Thank you for your fast and precise answer.
By repository I mean Compass folder.
In addition “files” are mostly datasets, contour, slate, workshop, notpad.
Best regards.
Correct, I checked official documentation for update dataset name, and we don’t have any API for such task yet, but indeed this can be something very important when required to move any POC project to PROD or any PROD project to DEPRECATED state.
I tried to check in developer tool as well and when we rename and resources, Foundry calls graphql gateway which is not accessible for now normally.