cns_rename

Renames a package by renaming files in the package directory.

Syntax

cns_rename oldname newname
cns_rename oldname newname subdir1 subdir2 ...
oldname
The current package name. cns_rename will locate the package by looking for a file called oldname_cns.m in your MATLAB path.

newname
The new name for the package.

subdir1 subdir2 ...
By default, cns_rename only renames files in the package directory itself. Here you may optionally add any subdirectories in which you also want files to be renamed. These are assumed to be relative to (i.e. underneath) the package directory.

Notes

All files in the package directory (and any subdirectories you specify) that start with oldname_ will be renamed to start with newname_. The function line inside each ".m" file is also updated.

Any references to the old function names that may exist in function bodies are not updated.

The package directory itself is not renamed.