Reorganising styles, PowerShell code to update style name to file name
Reorganising styles is easily done in File Explorer, but when you rename a style file (.costyle) the style name as it appears in C1 is not updated. Well, here are a few PowerShell code lines that update the style names of all .costyle files in the current folder to their respective file names:
$files = Get-ChildItem -Filter "*.costyle"
[RegEx]$regex = "(`<E K=`"Name`" V=)(`".*`")( `/`>)"
foreach ($file in $files) {
$baseName = $file.BaseName
$regex.Replace((Get-Content $file -Raw), "`$1`"$baseName`"`$3", 1) | Set-Content -Path $file
}
-
I think they should implement this as a native feature in their dev language. Not as an after-the-fact addition. Nice that you made something, but they could easily do this with a few lines of code and make it work flawlessly with the context menu in app.
Here's my feature suggestion. I've also upvoted yours. https://support.captureone.com/hc/en-us/community/posts/17052449911709-Implement-Rename-Styles-feature
0
Post ist für Kommentare geschlossen.
Kommentare
1 Kommentar