move or rename elements


accurev move [ -c <comment> ] { <file-element-name> | -e <eid> } <new-name>
accurev move [ -c <comment> ] { <file-element-name> | -e <eid> }
accurev move [ -c <comment> ] { <file-element-name> | -e <eid> }
accurev move [ -c <comment> ] { <directory-element-name> | -e <eid> | 
-l <list-file> } <destination-directory>


Note: You can spell this command name either move, mv, or rename.

The move command changes the pathname at which an element is accessed. You can use this command to perform a simple renaming, to move an element to another directory, or both. You cannot move an element to another depot. (This would violate AccuRev’s TimeSafe property: the element would magically appear in the past of the destination depot.)

You must specify a single element to move, either by name or by element-ID (-e option). Specifying a directory makes it a subdirectory of the <destination-directory> you specify.

Note: You can create a new directory with this command. The new directory is created as part of the move transaction.

Exclusive File Locking and Anchor-Required Workspaces

See File Locking in Workspaces.


–c <comment>

Specify a comment for the transaction. The next command-line argument should be a quoted string. Alternatively, the next argument can be in the form @<comment-file>, which uses the contents of text-file <comment-file> as the comment.

-e <eid>

The element-ID of the element to be moved. If you also specify a <list-file> or <element-list>, it is ignored.

-l <list-file>

Process the elements listed in <list-file>. This must be a text file, with one element name per line. Extra whitespace is not allowed; make sure there are no empty lines and no leading or trailing white space around the filenames. Wildcards are not expanded. There is no provision for comment lines in a <list-file>.

If you use this option, you cannot also use the -e option.


Rename file foo.c to bar.c:

> accurev move foo.c bar.c

Rename directory lib to library:

> accurev move lib library

Move file foo.c to the parent directory:

> accurev move foo.c ..

Move file foo.c into subdirectory subdir, and rename it to bar.c. (This command will create subdir if it did not already exist.):

> accurev move foo.c subdir/bar.c

See Also


Techniques for Selecting Elements