Renaming or moving an object

You can rename a file or directory, or move one or more files, directories, or projects to another directory (which might be in a different project). If you enter two arguments and the last argument is not set to an existing directory, the command is interpreted as a rename operation. Otherwise, the command is interpreted as a move operation.

When you rename a file or directory and the parent directory is not writable, a version is checked out automatically and associated with task. If a task is not specified, the current task is used by default. You must check in the directory to make it available to other users. The directory is automatically checked in when you complete the task.

When you move an object to or from a non-modifiable directory and the parent directory is non-modifiable, a version is checked out automatically and associated with the specified task. If a task is not specified, the current task is used by default. You must check in the directory to make it available to other users, which is automatically done when you complete the task.

If you are working in a shared project and the parent directory is non-modifiable, the directory is automatically checked out and associated with the current task. The directory is also checked in to the integrate state. You can disable this feature by setting shared_project_directory_checkin to FALSE in your initialization file.

You do not need to be in a work area to use this command if as you use the Folder specification.

Note: If you rename a file or directory used in other directories, review the other locations that use the object. Likewise, if you rename a file or directory used in directory versions other than the current or specified directory, review the other locations that use the object. The parent directory is checked out, but not other parent directories. You must check out the other directories to use the renamed object.

About this task

ccm mv|move|ren|rename [-task task_spec] file_spec... file_spec
file_spec
Specifies the files or directories to be renamed or moved, and the new name or new location. If the last file_spec argument is set to an existing controlled directory, the objects are moved from their current location to that directory. The directory can be in the same or different project as the objects being moved. If file_spec is not set to a controlled directory and only two arguments are specified, the file or directory specified by the first argument is renamed to the name and optional version specified by the last argument. See File specification for details.
-task task_spec
Specifies the task with which any parent directory that was automatically checked out is associated. If not specified and a current task is set, the current task is used by default. See Task specification for details.

Example


Feedback