Quote:
Originally Posted by BJN01
But could there be some simple lines to add at the end of the script to "double" the effect?
|
I couldn't quite understand at first what you meant by skipped. You can use this script to replace all occurrences of a string in the file/package names, with a single click.
Code:
/*
Cleanup names
Trigger : Toolbar button pressed
*/
if (name == "Cleanup packagenames") {
getAllCrawledPackages().forEach(function(i) {
var replace = function(a, b) {
i.name = i.name.split(a).join(b);
}
replace("-Vol ", "-V0");
})
}
if (name == "Cleanup filenames") {
getAllCrawledLinks().forEach(function(i) {
var replace = function(a, b) {
i.name = i.name.split(a).join(b);
}
replace("Ch_", "Ch");
})
}