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
- Move the file octagon.h from the src directory
to the incl directory in your current project.
Windows:
ccm
move src\octagon.h incl/
UNIX:
ccm move src/octagon.h
incl/
- Rename the file turquoise.c to magenta.c in
the current project.
ccm move turquoise.c
magenta.c
- Rename the ccm_aug8-1 project to test_a-1.
Windows:
ccm move -p ccm_aug8-1 test_a-1
Setting path for work
area of 'test_a-1' to 'c:\users\mary\ccm_wa\ccmint07\test_a-1'...
UNIX:
ccm
move -p ccm_aug8-1 test_a-1
Setting path for work area
of 'test_a-1' to '/mary/ccm_wa/ccmint07/test_a-1'...
- Rename the hello.c file to hi_world.c,
then move it to another project directory.
Windows:
ccm move proj\hello.c@proj-1 screen\src\hi_dir\hi_world.c@beta-3
UNIX:
ccm
move proj/hello.c@proj-1 screen/src/hi_dir/hi_world.c@beta-3
- Move the file hello.c from beta-1 to
a new project called final-1.
Windows:
ccm move beta-1\hello.c@beta-1 final@final-1
UNIX:
ccm
move beta-1/hello.c@beta-1 final@final-1