gtpo1m63Operations

ZFILE mv-Move or Rename a File or Directory

Use this command to move or rename a file or directory.

Requirements and Restrictions

Format




-f
forces existing files to be overwritten regardless of the access permissions that are set.
Note:
This parameter does not override the access permissions for a parent directory; that is, if the access permissions for the parent directory of the specified file do not allow write authority, the -f parameter is ignored and the specified file will not be moved or renamed. In addition, an error message is not issued if the move or rename is unsuccessful.

source
is the path name of the file or directory that you want to move or rename.

target
is the path name of the file or directory to which you are moving or renaming the file or directory. If you specify an existing directory, the contents of each source file are copied to that directory with names specified by the last component of the source path name. If you specify an existing file, the file is only overwritten if you specify the -f parameter.

Additional Information

Examples

In the following example, old.name is renamed.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE mv old.name new.name                                                           |
|                                                                                             |
|System: FILE0003I 15:31:22 mv old.name... COMPLETED SUCCESSFULLY.  NO OUTPUT TO DISPLAY      |
+---------------------------------------------------------------------------------------------+

In the following example, file.name is moved to another directory.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE mv file.name new.subdirectory/                                                 |
|                                                                                             |
|System: FILE0003I 15:31:22 mv file.nam... COMPLETED SUCCESSFULLY. NO OUTPUT TO DISPLAY       |
+---------------------------------------------------------------------------------------------+

In the following example, old.name is renamed and moved to another directory.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE mv old.name new.subdirectory/new.name                                          |
|                                                                                             |
|System: FILE0003I 15:31:22 mv old.name... COMPLETED SUCCESSFULLY. NO OUTPUT TO DISPLAY       |
+---------------------------------------------------------------------------------------------+

Related Information

See Information Technology--Portable Operating System Interface for Computer Environments (POSIX) for more information about the POSIX standards.